#include<stdio.h>
#include<string.h>
main()
{
char a[3][3]={0},ch;
int i,j=0;
printf("请输入3行字符每行3个:\n");
for(i=0;i<3;i++){
j = 0;
while((ch = getchar()) != '\n'){
a[i][j]=ch;
j++;}
}
printf("输出字符:\n");
for(i = 0; i < 3; i++)
{
for(j = 0; j < 3; j++)
{
printf("%c ",a[i][j]);
}
printf("\n");
}
return 0;
}