+ 1

Addition of array

what does sum+= mean?

15th Apr 2017, 6:22 AM
Shreya Parmar
Shreya Parmar - avatar
3 Answers
+ 26
For example, sum=5 and x=10. sum += x means sum = sum + x sum = 5 + 10 sum = 15
15th Apr 2017, 6:27 AM
Shamima Yasmin
Shamima Yasmin - avatar
+ 20
Yes, sum is the variable name here.
15th Apr 2017, 9:00 AM
Shamima Yasmin
Shamima Yasmin - avatar
+ 1
so here the sum word is just the name right? sum=sum+x. here the first word sum is just the name?
15th Apr 2017, 6:38 AM
Shreya Parmar
Shreya Parmar - avatar