+ 2

Name of the error and correction for this

while(count1=10); { count = 1; sum = sum+x; count = count+1; }

18th Feb 2018, 6:45 PM
Anshul Sharma
Anshul Sharma - avatar
1 Antwort
+ 3
count1 is never modified in the loop apart from the "condition" instead of =, you should use == in the condition if you initialize count in the loop, the value of it will never change from one looping to the next one
19th Feb 2018, 4:39 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar