Bianca is preparing special dishes for her daughter’s birthday.
It takes hera minutes to prepare the first dish, and each following dish takesb minutes longer than the previous dish. She hast minutes to prepare the dishes.
For example, if the first dish takesa =10 minutes andb =5, then the second dish will take15 minutes, the third dish will take20 minutes, and so on.
If she has80 minutes to prepare the dishes, then she can prepare four dishes because10 +15 +20 +25 =70.
Write a program that prompts the user to enter the values ofa,b, andt, and outputs the number of dishes Bianca can prepare.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here