Question: Beginner C++ programmer: Not sure how i would calculate this, know I need a loop but unsure of what kind and how to implement. I

Beginner C++ programmer: Not sure how i would calculate this, know I need a loop but unsure of what kind and how to implement. I think for-loop but not sure about the mathematical operation to get the desired result. Any help at all will be upvoted and greatly appreciated!

On day 1, there was only 1 person with the flu.

On day 2, it jumped to 5.

On day 3, there were 17

Every day since, the number of people who have the flu is equal to the last 3 days combined. You will make a program that will ask the user for what day they want a count of people with the flu for. Then display the amount.

Heres what I have so far:

Beginner C++ programmer: Not sure how i would calculate this, know I

#include int main() int numDays1: int numSick; std: :cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!