6

does anyone know how to input 2d array?

 2 years ago
source link: http://codeforces.com/blog/entry/96497
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
does anyone know how to input 2d array?

By nrg_aceu, history, 64 minutes ago,

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;

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK