+ 1
What happens in the coding where we write total+=number and why we write num and number which is same i guess.
also tell me how it is working here i didn't get it
2 Answers
+ 6
x+=y means x=x+y
num and number are variable,could be named ANYTHING,if they follow a proper criteria.
+ 3
"num" and "number" are not the same. They are two different variables.
total += number means that you are adding the value of "number" to the value of "total".