Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

ISBN: 1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago