1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#include <iostream>
using namespace std;
int main()
{
char grid[5][5] = {{'1','2','3','4','5'},
{'1','2','3','4','5'},
{'1','2','3','4','5'},
{'1','2','3','4','5'},
{'1','2','3','4','5'}};
for (int i = 0; i < 5; i ++) // Declare and initialize i
{ for (int j = 0; j < 5; j ++) // Declare and initialize j
cout << grid[i][j] << " "; // Add a space between numbers
cout << endl; // Flush each line
}
return 0;
}
|
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
Press any key to continue . . . | |