why in the 18th line this command is used
sum = sum + number;
Nitin Saini
Level 4
help please
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Vadim “迪姆哥”
12 July 2023, 19:55
This command is calculating the sum of the entered integers:
It adds value of "number" to value of "sum", then stores result back to "sum" variable.
for example of sum = 4, and number = 1, the expression will be sum = 4 + 1, then at the end "sum" variable will store value of 5.
0