Storing and printing matrices
I am trying to make a program which will ask the user to input a series of numbers, then in end, display the numbers. I am using arrays and need to save the numbers in a 3x4 matrix and then display it. This is what I have:
Code:
#include <iostream>
#include <iomanip>
using namespace std;
const int numrow = 3;
const int numcol = 4;
int grades [numrow][numcol];
int main ()
{
for (int i = 0; i <= 3; i++)
{
cout << endl;
for (int j = 0; j <= 4; j++)
{
cout << "enter grades for row # " << (i + 1)<< ": ";
cin >> grades [numrow][numcol];
}
}
cout << setw (4) << grades [i][j];
return 0;
}
any help would be greatly appreciated as I do not know what is missing/ needs to be put in/ needs to be changed/ etc.