int main() {
int n,i,j,k=1;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
if(k==1)
printf("1");
else
printf("0");
k=k*-1;
}
printf("\n");
}
}
No comments:
Post a Comment