Display

This is a discussion on Display within the C++ Programming forums, part of the General Programming Boards category; In the following code, at the end, I would like to have "Total Weekly Calories: " displayed along with the ...

Display

In the following code, at the end, I would like to have "Total Weekly Calories: " displayed along with the total amount.

However I have "Total Weekly Calories:" display seven times and the correct total is in the seventh spot. How can I get "Total...to show only once and the correct amount to display? I have tried everything that I can think of and still can not come up with anything. I can get the "Total Weekly Calories" to display once but then the amount of calories is incorrect. Please see if you can see my errors?