asked 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.

asked
User VitalyT
by
8.5k points

1 Answer

2 votes
total += amount

If your language does not support that, just use

total = total + amount
answered
User Bettsy
by
8.0k points

No related questions found