Problem Statement: Write a program in c that will print the chess board. Enter a number to print the board.
#include<stdio.h> #include<conio.h> int main() { int i,j,num; printf("Enter the number : "); scanf("%d",&num); for(i=0;i<num;i++) { for(j=0;j<=num;j++) { printf("\xDB"); printf(" "); } printf("\n"); if(i%2==0) { printf(" "); } } getch (); return 0; }
Wonderfull
ReplyDeleteA great way to utilize characters.
Could u plz explain the whole process.
ReplyDelete