打印出国际象棋棋盘.

#include <stdio.h>
int main()
{   /*打印出国际象棋棋盘*/
    int i,j;
    for (i=0;i<8;i++)
    {
        for (j=0;j<8;j++)
        {
            if ((i+j)%2==0)
                printf("%c",219);
            else
                printf(" ");
        }
        printf("\n");
    }
    getch();
    return 0;
}

posted @ 2013-03-04 13:21  王井玉  阅读(246)  评论(0编辑  收藏  举报