+ 1
What’s wrong here?? Please help.
3 Respostas
+ 1
Just add a 'Sum=0;' after the third loop inside to reset the value of Sum to 0 for next multiplication.
https://code.sololearn.com/c4GNgwQ4z13M/?ref=app
+ 1
So many thanks Eve. But i don’t understand this. Initially I declare Sum =0 therefore the result would Come but it’s false or incorrect. Please explain the reason behind this. Thanks in advance ❤️❤️
0
Muhammad Rakib I think that is because on line 12 and line 13 (the inner for loop), the value of Sum changes. That is why I thought of resetting the value of Sum to 0 after that particular for loop that changes the value of Sum.