0

Why this not code not working as expected?

https://code.sololearn.com/c6Y7G786VGao/?ref=app The loop in this code is not working as expected but why?

17th Mar 2019, 12:24 PM
Nitin Madas
Nitin Madas - avatar
2 Answers
+ 2
The loop in the code is working exactly as expected. You simply forgot to reset 'n' to 0 in each iteration.
17th Mar 2019, 4:01 PM
Shadow
Shadow - avatar
+ 1
Thanks you so much !
17th Mar 2019, 4:26 PM
Nitin Madas
Nitin Madas - avatar