Create a Project : Nested_Arrays2

 

Use this code
#include <iostream>
using namespace std;
//QT2DArray1.prj main.cpp
void multiarray()
{
cout << "6 x6 multidimentinal array!" << endl;
 // Declare a 10x10 array
const int nRows = 6;
const int nColumns = 6;
int nArrayTable[nRows ][nColumns ] = { 0 };
// Populate a multiplication table
for (int nRow = 0; nRow < nRows; nRow++){
    for (int nCol = 0; nCol < nColumns; nCol++){
    nArrayTable[nRow][nCol] = nRow * nCol;
}}

			
// Print the table
for (int nRow = 1; nRow < nRows; nRow++)
{
    for (int nCol = 1; nCol < nColumns; nCol++)
    cout << nArrayTable[nRow][nCol] << "\t";
    cout << endl;
}
}

			
int main()
{
    multiarray();
    cout << "Good Bye!" << endl;
    return 0;
}