64,685
社区成员
发帖
与我相关
我的任务
分享
int main()
{
assert(!(N%2));
char coin[N];
int i, j;
int count = 0;
for(j=0; j <N; j++)
{
coin[j] = true;
cout << setw(3) << '*';
}
cout << endl;
cout << endl;
for (i=0; i <N; i++) //这个地方
{
for (j=0; j <N; j++) //这个地方
{
if (j!=i) //这个地方
{
coin[j] = !coin[j];
}
if (coin[j])
cout << setw(3) << '*'; //这个地方
else
cout << setw(3) << '0';
}
++count;
cout << endl;
}
cout << count;
cout << endl;
return 0;
}