The assignment "write a complete C++ program that declares a 2 dimensional integer array of size 10 rows and 10 columns. The program should use two nested for loops to fill the array as follows. If the row number is divisible by the column number then put the row number in the cell, otherwise put the column number in the cell. The program should then use nested for loops to print the array in table form to the screen."
Here is what I have:
#include<iostream>
using namespace std;
int main()
{
int i=10;
int j=10;
int board[10][10];
for(int i=0; i<9; i++)
{
for(int j=0; j<9; j++)
{
board[i][j] = 0;
}
}
After running it I get only 0's across the 10 rows and columns, its supposed to have numbers like in row column[0][0] a 0 next a 1 so on so forth but cant get anything other then 0 any suggestions?