does anyone know how to input 2d array?

Revision en1, by mac_n_cheese_pog, 2021-11-01 04:04:45

dunno whats wrong

int n;

cin >> n;

int a[100][100];

for(int i=0;i<n;i++)

{

for(int j=0;j<n;j++)

{

    cin >> a[i][j];

}

}

for(int i=0;i<n;i++)

{

for(int j=0;j<n;j++)

{

    cout << a[i][j];

}

cout << endl;

}

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English mac_n_cheese_pog 2021-11-01 04:04:45 339 Initial revision (published)