0

About While loop

can someone tell me what is the meaning of ( total += number; ) in this example : while (num <= 5) { cin >> number; total += number; num++;

26th Jul 2017, 11:23 PM
shayan kamal
shayan kamal - avatar
2 Answers
+ 4
It means total is being increased by number. short for writing: total = total + (number)
26th Jul 2017, 11:29 PM
Rrestoring faith
Rrestoring faith - avatar
0
Oh thank you man .
27th Jul 2017, 12:08 AM
shayan kamal
shayan kamal - avatar