Bianca is preparing special dishes for her daughter’s birthday. It takes her a minutes to prepare the first dish, and each following dish takes b minutes longer than the previous dish. She has t minutes to prepare the dishes. For example, if the first dish takes a = 10 minutes and b = 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 enter the values of a, b, and t, and outputs the number of dishes Bianca can prepare.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter17: Markov Chains
Section: Chapter Questions
Problem 12RP
icon
Related questions
Question

Bianca is preparing special dishes for her daughter’s birthday.

It takes her a minutes to prepare the first dish, and each following dish takes b minutes longer than the previous dish. She has t minutes to prepare the dishes.

For example, if the first dish takes a = 10 minutes and b = 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 enter the values of ab, and t, and outputs the number of dishes Bianca can prepare.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Topological Sort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning