#include <iostream>
#include <iomanip>
usingnamespace std;
constint ro=5;
constint col=5;
void multi(int mb[ro][col])
{
for (int i = 1; i < ro; i++) {
mb[0][i] = i;
}
for (int i = 1; i < ro; i++){
mb[i][0] = i;
for (int j = 1; j < col; j++)
mb[i][j] = i * j;
}
}
int main()
{
int mb[ro][col] ={};
multi(mb);
for (int i = 0; i < ro; i++) {
for (int j = 0; j < col; j++) {
cout << " " << setw(4) << mb[i][j];
}
cout << endl;
}
system("pause");
return 0;
}
it outputs a 5x5 multiplication table...the thing is the professor wants us to use global variables for the array as well
so i think the code would look something like this