could someone explain me this | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 Answers
+ 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