battleship game help me plaaaaaaese:(
hello I am a new member here
I need your help
I have to write battleship game in c langauge ??
I have been write just the biginning and i can not complet the rest can you help me ??
this my code
Code:
#include<stdio.h>
#include<stdlib.h>
void print2DArray(char array2D[][10])
{
int row, col;
for(row=0; row<10; row++) {
for(col=0; col<10; col++)
printf("%c", array2D[row][col]);
printf("\n");
}
}
int main()
{
char battleship[10][10];
int row, column;
char ch;
char rowArray[10] = "12345678910"; // Changed it so that it is not the same identifier with the int row
char columnArray[10] = "ABCDEFGHIJKL"; // Changed it so that it is not the same identifier with the int column
for(row=0; row<10; row++)
for(column=0; column<10; column++)
battleship[row][column] = '~';
print2DArray(battleship);
return 0;
}
thank you