#include<iostream>
using namespace std;

int main()
{

    int n=0,m=0; // 2D array nRow, nCol
    int a[n][m];
    int i,j; // цикъл въвеждане 2D
    int q,p,t; // for 2D=>1D
    int b[100];
    int r; // for cout
    cout<<"Enter the array's number of rows and columns: ";
    cin>>n>>m;

    // entering values for the 2D array
        for (i = 0;i<=n;i++)
        {
            for (j = 0;j<=m;j++)
            {
                cout<<"a["<<i<<"]["<<j<<"]="<<endl;
                cin>>a[i][j];
                cin.ignore();


            }
        }

    // Most likely the failzone IMO
   for (q = 0;q<=i;q++)
        {
            for (t = 0;t<=i*j+j;t++)
            {
                b[t] = a[i][j];
            }
        }
    // attempting to print the 1D values
    cout<<"The values in the array are"<<"\n";
    for(r=0;r<=t;r++)
        {
            cout<<"b["<<r<<"] = "<<b[r]<<endl;
        }

cin.get();
return 0;
}
