用C语言输出中国象棋棋盘的源代码!!急!急!急!

2024-07-22 20:08:07作者:饭克斯

#include

voidmain()

{intr=0;

intc=0;

intstar_one=10;

for(r=0;r<=star_one*9;r+=2)

{for(c=0;c<=star_one*8;c++)

{if((r%star_one==0||c%star_one==0)&&c%2==0&&(r=star_one*4+star_one)||(r>=star_one*4&&r<=star_one*4+star_one&&(c==0||c==star_one*8)))

{printf(%c,'*');}

else

{printf(%c,'');}

}

printf(\n);

}

}

展开全文

热门推荐

相关攻略

猜你喜欢