写了半天,我估计我写的比较笨吧
- #include <stdio.h>
- int main()
- {
- int ages[5][5]={
- {1,0,0,0,1},
- {0,1,0,1,0},
- {0,0,1,0,0},
- {0,1,0,1,0},
- {1,0,0,0,1}
- };
- for (int i=0; i<5;i++ )
- {
- for (int j=0; j<5; j++)
- {
- printf("%d",ages[i][j]);
- if (j==4)
- {
- printf("\n");
- }
- }
- }
- return 0;
- }
复制代码 |