Question: c++ program, Miryam is preparing special dishes for her son's birthday. It takes her x minutes to prepare the first dish, and each following dish

c++ program,

Miryam is preparing special dishes for her son's birthday. It takes her x minutes to prepare the first dish, and each following dish takes y minutes longer than the previous dish. She has z minutes to prepare the dishes. For example, if the first dish takes x=10 minutes and y=5, then the second dish will take 15 minutes, the third dish will take 20 minutes, and so on. If she has 80 minutes to prepare the dishes, then she can prepare four dishes because 10+15+20+25=70.

Write a program that prompts the user to input the values of x, y, and z, and outputs the number of dishes Miryam can prepare.

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!