#include <stdio.h>
void main()
{
int a[6][6],i,j,k,h,l,n;
k=1;
l=5;
n=0;
//플러스//
aa:
for(j=k;j<=l;j++)
{
n=n+1;
a[i][j]=n;
}
l=l-1;
k=k+1;
for(i=k;i<=l;i++)
{
n=n+1;
a[i][j]=n;
}
//마이너스//
h=j-1;
이아래부분을 모르겟어요 ㅜㅜ
for(j=l;j>=;j--)
{
n=n+1;
a[i][j]=n;
}
for(i=l;i>=;i--)
{
n=n+1;
a[i][j]=n;
}
if(n==25)
for(i=1;j<=5;i++)
{
for(j=1;j<=5;j++)
{
printf("%i",a[i][j]);
}
printf("\n");
}
else
goto aa;
}
|