1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Setler [38]
4 years ago
11

Bianca is preparing special dishes for her daughter’s birthday. It takes her a minutes to prepare the first dish, and each follo

wing 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.
Computers and Technology
1 answer:
blagie [28]4 years ago
4 0

Answer:

The solution code is written in Python:

  1. a = int(input("Input first dish time: "))
  2. b = int(input("Input extra minutes: "))
  3. t = int(input("Input time available: "))
  4. dishesCount = 1  
  5. currentTotal = a + b
  6. while(currentTotal <= t):
  7.    dishesCount += 1
  8.    currentTotal += currentTotal + b
  9. print("Number of dishes can be prepared: " + str(dishesCount))

Explanation:

Firstly, prompt user to input the first dish time, extra minutes and time available and assign the values to variable a, b and t, respectively (Line 1-3).

Next, create variable dishesCount to hold the number of dishes can be prepared (Line 5).

Get the current total time by adding a and b and assign it to variable currentTotal (Line 6).

While the currentTotal is less than or equal to t, increment the dishesCount by one and then add the hour of current dish to the currentTotal (Line 9-10).

At last, display the number of dishes that can be prepared in t minutes (Line 12).

You might be interested in
Only people who have nitrotype answer this question!!!
grigory [225]

Answer:

Krampus 4k Nitrotype team- VVIXEN

3 0
3 years ago
Read 2 more answers
Write a program that converts temperatures in the Celsius scale to temperatures in the Fahrenheit scale. Your program should ask
Aleks [24]

Answer:

#include <iostream>

using namespace std;

int main()

{

   float celsius;

  cout<<"Enter the temperature in Celsius: ";

  cin>>celsius;

 

  float Fahrenheit  = 1.8 * celsius + 32;

  cout<<"The temperature in Fahrenheit  is: "<<Fahrenheit<<endl;

}

Explanation:

first include the library iostream in the c++ programming.

Then, create the main function and declare the variable celsius.

cout is used to print the message on the screen.

cin is used to store the user enter value in the variable.

then, apply the formula for calculating the temperature in Fahrenheit

and store the result in the variable.

Finally, print the result.

6 0
4 years ago
How is a ink pen better than a digital pen.
Hatshy [7]
It depends on what digital pen you're using.
Ink pens are better because they don't run out of ink like digital and you dont have to re-charge every time.
Hope this helps!:)<span />
8 0
4 years ago
Which activity should be part of a long-term plan to positively affect your
STatiana [176]
D that is the answer but I need 20 words to send this text
5 0
3 years ago
How do i mark brainliest?
neonofarm [45]

Answer: There is a crown button that should pop up by the question you have asked.

Explanation: ...

8 0
3 years ago
Read 2 more answers
Other questions:
  • A low concentration of market power has positive affects. A low concentration of market share has which of the following effects
    7·1 answer
  • You have installed five new 300 GB disk drives into a server running Windows Server 2012. You want to create a volume that will
    15·1 answer
  • Steve adds a second 1-GB 240-pin DIMM to his PC, which should bring the total RAM in the system up to 2 GB. The PC has an Intel
    14·1 answer
  • In order to create a multi-line comment, what symbol do you use?
    14·1 answer
  • A line in the Agile Manifesto reads, "____________ and _____________ over processes and tools". Please select which option best
    9·1 answer
  • What will be the value of “sumtotal” when this code is executed?
    6·1 answer
  • Write down the reciprocal of 40​
    12·1 answer
  • To create a cell reference in another spreadsheet you must need to start with _______ sign.
    14·1 answer
  • You have a server with two physical processors, each with four cores for a total of 8 cores. How many license packs must you buy
    10·1 answer
  • How does ludonarrative apply to game design
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!