Given that two int variables , total and amount , have been declared , write a sequence of statements that: initializes total to 0 reads three values into amount , one at a time.

Given that two int variables , total and amount , have been declared , write a sequence of statements that:  initializes total to 0 reads three values into amount , one at a time.

LANGUAGE: C++

CHALLENGE:

Given that two int variables , total and amount , have been declared , write a sequence of statements that:
initializes total to 0
reads three values into amount , one at a time.

After each value is read in to amount , it is added to the value in total (that is, total is incremented by the value in amount ).

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level