Question
I am writing this in C programming. As supposed I have to print out a gomoku board, with the side wall and bottom wall like
I am writing this in C programming.
As supposed I have to print out a gomoku board, with the side wall and bottom wall "like the one in white command window" , the middle part of the walls is 15x15.
The black command window is my out put, the white command window is the output i need to get to.
I can not print out like the "WHITE COMMAND WINDOW", my output keep missing numbers at the bottom wall. Please help, thanks in advance
#include
#define SIZE 17
int i,j; int main(){
char table[SIZE][SIZE]={' '};
int game=1;
char c;//side wall
char d;//bottom wall
//while(game=1){
//print out board
for(i=0;i
for(c = 'o'; c>='a';--c){
table[i][0]=c;
table[i][1]='|';//
table[16][i=i+1];
}
}
for(j=3;j
table[15][j]='-';
}
//The last row of the array will have 1 2 3 4 5 6 7 8 9 A B C D F
for(j=3;jstart setting numbers at j=3
table[16][j]==j;
}
//At the bottom the the 2D array,
int jay=0;
for(jay=12;jay for(d = 'A';d table[16][jay]==d; table[16][jay=jay+2]; } } for(i=0;i printf(" "); for(j=0;j printf("%2c", table[i][j]);//THIS to print out the table 17x17 } } printf(" "); } return 0; } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started