23.6k views
0 votes
Write a statement that increases the value of the int variable total by the value of the int variable amount. that is, add the value of amount to total and assign the result to total.

User VitalyT
by
6.1k points

1 Answer

2 votes
total += amount

If your language does not support that, just use

total = total + amount
User Bettsy
by
5.7k points