0
It doesn't work properly. Please what is wrong!
5 Answers
+ 2
You change n in the 2nd while loop too. So n = 0 in the end and n != sum
+ 1
You change the value of n in line 12 and then after resetting it in li e 16, you change it a again line 22.
+ 1
Lisa thanks for help.
+ 1
You could add another variable in the top in which you keep num = 153 and then reassign n = num if needed an compare num == sum i the end
0
Another question, why do I have to write n=153 once again before second while loop. If I do that at the beginning when I declare and inicialise it?