1#include <iostream>
2
3using namespace std;
4
5int main()
6{
7 int numberOfItems;
8 int totalCalories = 0;
9 int caloriesForItem;
10 cout << "How many items did you eat today? ";
11 cin >> numberOfItems;
12 cout << "Enter the number of calories in each of the "
13 << numberOfItems << " items eaten: " << endl;
14
15 for (int count = 1; count <= numberOfItems; count++)
16 {
17 cout << "Enter calorie: ";
18 cin >> caloriesForItem;
19 totalCalories += caloriesForItem;
20 }
21
22 cout << "Total calories eaten today = " << totalCalories;
23
24 return 0;
25}