I am working on writing the pseudocode for a calorie counting program that calculates the total weekly calories for breakfast. the program should allow the user to enter the number of calories consumed each day for 7 days, then report the number of breakfast calories consumed for the entire week.
My professor covered the topic of For Loops briefly, but didn't explain much about how to write them.
How would I write a For loop for the program above, and what would I delcare the variables of calories as?
So far I have a small piece written, but it's short and I don't know where to go with it, or if it needs anything additional.
Start
Declare BreakfastCalories[7] as an Array
For i = 1 to 7
- Display "Enter breakfast calories dor day" i
- Enter calories(I)
End For
Set total = day1 + day2 + day3 + day4 + day5 + day6 + day7
Display "Total breakfast calories consumed is", total
End