0

how to show matrix which the elemen inputed by user ?example if user inputed by java util scanner [1,1] 5 [1,2] 4 [2,1]1 [2,2]1 how we show the matrix final is 5 4 1 1

17th Sep 2016, 1:42 PM
nisa905
nisa905 - avatar
2 Answers
+ 1
Do a nested loop, print the value in the nested loop followed by a space, skip a line between the end of the nested loop and the end of the main loop.
17th Sep 2016, 2:14 PM
Zen
Zen - avatar
0
i use loop "for" i declarate the variable in the first "for" function and when i write loop "for" again in the different line the variable not include so in the second "for" function can't be executate
17th Sep 2016, 4:10 PM
nisa905
nisa905 - avatar