Question: Write a program in C + + that asks the user their name and how many apples they have eaten in the last 3 0

Write a program in C++ that asks the user their name and how many apples they have eaten in the last 30-days.
Use cin to store the user's responses in a string and an int variable: string name and int apples
Create another variable representing the difference between 30 and the number of apples they have eaten: int moreApples
Then, displays the message:
"[name], you have to eat [moreApples] today to keep the doctor away!"

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 Programming Questions!