0
while loop iteration
int num = 1; int number; int total = 1; while (num <= 5) { cin >> number; total=total+number; num++; } cout << total << endl; return 0; } can anybody explain it to me.
1 Odpowiedź
+ 1
loop will run 5 times.
each time it will ask for any number as Input and it will make sum of all the 5 entered numbers+1.