+ 1

Help me to solve issue in my code

There is error written as a comment. I do not understand what is wrong there. Please help. https://code.sololearn.com/c6V5a3Oq2Sy2/?ref=app

29th Dec 2017, 3:52 PM
Sad
Sad - avatar
3 Answers
+ 5
The scope of variable a is only within the inner for loop. So it isn't valid to be used in the outer for loop. You had better initialize a outside the loops.
29th Dec 2017, 3:56 PM
DAB
DAB - avatar
+ 4
a is not accessible outside the for loop.So if you wanna use it outside the loop, you will have to initialize it outside the loop
29th Dec 2017, 4:02 PM
Md. Nafis Ul Haque Shifat
Md. Nafis Ul Haque Shifat - avatar
+ 3
Thanks!
29th Dec 2017, 4:01 PM
Sad
Sad - avatar