could someone explain me this | Sololearn: Learn to code for FREE!
0

could someone explain me this

int num = 1; int number; int total = 0; while (num <= 5) { cin >> number; total += number; num++; } cout << total << endl; What is the answer?

4th Nov 2019, 9:21 PM
Assou Sipas
Assou Sipas - avatar
2 odpowiedzi
+ 4
It will taking the user input five times and sum it
4th Nov 2019, 9:35 PM
ZΛRTHΛИ
ZΛRTHΛИ - avatar
0
could you pls explain it better with numbers
4th Nov 2019, 9:37 PM
Assou Sipas
Assou Sipas - avatar