+ 1

Why does this not print 1-10? Is it printing the addresses? So confused please help!

Using range-based for to print 2D array. https://code.sololearn.com/cxj48PbVt7qA/?ref=app

16th Jan 2018, 8:53 PM
Shawn Brown
Shawn Brown - avatar
3 Respostas
+ 2
You created an array called a that is 5x5. Thats 5 colums and 5 rows but you only specified 2 sets of 5. I would recommed using two for loops to test instead of the auto loop.
16th Jan 2018, 8:58 PM
Joseph
+ 1
Oh wow, now i feel stupid. Thanks @Joseph
16th Jan 2018, 9:09 PM
Shawn Brown
Shawn Brown - avatar
+ 1
updated
16th Jan 2018, 10:28 PM
Shawn Brown
Shawn Brown - avatar