0
while loop
int num = 1; int number; int total = 0; while (num <= 5) { cin >> number; total += number; num++; } cout << total << endl; can't understand this code do ?!
1 Answer
0
This code asks five times for a input and than prints result of that sum.