1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#include <iostream>
using namespace std;
int main()
{
const int WIDTH = 4;
const int HEIGHT = 4;
int numberLeft = 1;
int guess;
bool success;
int gameBoard[WIDTH][HEIGHT] = {{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
{0,0,0,0}};
cout << " 1|2|3|4|" << endl;
for(int i = 0; i < WIDTH; i++)
{
cout << numberLeft << "|";
numberLeft++;
for(int j = 0; j < HEIGHT; j++)
{
cout << gameBoard[i][j] << "|";
}
cout << endl;
}
cout << endl;
cout << "Enter X-coordinates: " << endl;
cout << "Enter Y-coordinates: ";
return 0;
}
|