#include<stdio.h>
int main()
{
int a[6][6]={{0},{0,0,1,1},{1,1,0,0,1},{0,1,1},{1,1,0,1},{0,1,0,0,1}};
int z=0,k=0;
for (;k<6;k++)
{
for (z=0;z<6;z++)
printf("%d",a[k][z]);
printf("\n ");
}
return 0;
}
#include<stdio.h>
int main()
{
int a[6][6]={{0},{0,0,1,1},{1,1,0,0,1},{0,1,1},{1,1,0,1},{0,1,0,0,1}};
int z=0,k=0;
for (;k<6;k++)
{
for (;z<6;z++)
printf("%d",a[k][z]);
printf("\n ");
}
return 0;
}
两个代码 第二个for里面没有z=0;所以会出错!!!!!!!!!!11
时间: 2024-10-10 20:34:30