0
Write a program that will determine the color of the chess board coordinates
For example i enter "c" & "5" the c5 is black
3 odpowiedzi
0
So this is the homework you got today? Please show us your attempt!
0
#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("Black");
printf(" ");
}
printf("White");
if(i%2==0)
{
printf(" ");
}
}
getch ();
return 0;
}
- 1
What attempt?