/*#include<stdio.h>
#include<string.h>
int main()
{
char str[201] = {0};
int a=0, i, j;
gets(str);
for (i = 0; str[i] != NULL; i++)
{
if('a'<=str[i]&&str[i]<='c')
{
str[i]+=23;
}
else if(str[i]==' ')
{
printf("");
}
else
{
str[i]-=3;
}
printf("%c",str[i]);
}
return 0;
}
#include<stdio.h>
#include<string.h>
int main()
{
char str[201]={0};
int a,i,b,c;
gets (str);
for(i=0;str[i] != NULL;i++)
{
if('z'>=str[i]&&str[i]>='x')
{
str[i]-=23;
}
else if(str[i]==' ')
{
printf("");
}
else
{
str[i]+=3;
}
}
printf("%s",str);
}
*//*//*
#include<stdio.h>
#include<string.h>
int main()
{
char str[101]={0};
int a=0,i,b=0,c;
scanf("%s",str);
for(i=0;str[i] != NULL;i++)
{
if(str[i]=='C'||str[i]=='c')
{
a+=1;
}
else
{
a+=0;
}
if(str[i]=='C'||str[i]=='c'&&str[i+1]=='C'||str[i+1]=='c')str[i]=='c'&&str[i+1]=='C'||str[i]=='C'&&str[i+1]=='C'||str[i]=='C'&&str[i+1]=='c'||str[i]=='c'&&str[i+1]=='c')
{
b+=1;
}
else
{
b+=0;
}
}
printf("%d \n%d",a,b);
}
1차원 선
2차원 평면
3차원 3D 입체
1차원 배열 : 주택 단지
#include<stdio.h>
int main()
{
int arr[50][50]={};
int i, j,k=1;
for(j=1;j<=5;j++)
{
for(i=1;i<=3;i++)
{
arr[i][j]=k++;
}
}
for(i=1;i<=3;i++)
{
for(j=1;j<=5;j++)
{
printf("%d ",arr[i][j]);
}
printf("\n");
}
return 0;
}
*//*
#include<stdio.h>
int main()
{
int arr[100][100]={},i,j,n=0,k=1;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n ;j++)5
{
arr[i][j]=k++;
}
}
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf("%d ",arr[i][j]);
}
printf("\n");
}
return 0;
}
*//*
#include<stdio.h>
int main()
{
int arr[100][100]={},i,j,n,k=1;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=n;j>=1;j--)
{
arr[i][j]=k++;
}
}
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf("%d ",arr[i][j]);
}
printf("\n");
}
}
*//*
#include<stdio.h>
int main()
{
int arr[101][101]={},i,j,k=1,n;
scanf("%d",&n);
for(j=1;j<=n;j++)
{
for(i=1;i<=n;i++)
{
arr[i][j]=k++;
}
}
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf("%d ",arr[i][j]);
}
printf("\n");
}
}
*/
#include<stdio.h>
int main()
{
int arr[101][101]={},i,j,k=1,n;
scanf("%d",&n);
for(j=1;j<=n;j++)
{
for(i=n;i>=1;i--)
{
arr[i][j]=k++;
}
}
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf("%d ",arr[i][j]);
}
printf("\n");
}
return 0;
}



