0

Write a program that will determine the color of the chess board coordinates

For example i enter "c" & "5" the c5 is black

30th Jan 2019, 11:38 AM
Jerald De Vera
Jerald De Vera - avatar
3 Respostas
0
So this is the homework you got today? Please show us your attempt!
30th Jan 2019, 11:48 AM
HonFu
HonFu - avatar
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; }
30th Jan 2019, 12:35 PM
Jerald De Vera
Jerald De Vera - avatar
- 1
What attempt?
30th Jan 2019, 12:33 PM
Jerald De Vera
Jerald De Vera - avatar