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
ser-zykov [4K]
2 years ago
6

A cookie recipe calls for the following ingredients: • 1.5 cups of sugar • 1 cup of butter • 2.75 cups of flour The recipe produ

ces 48 cookies with this amount of ingredients. Write a program that asks the user how many cookies they want to make and then displays the number of cups of each ingredient needed for the specified number of cookies in the following format: You need 5 cups of sugar, 3 cups of butter, and 7 cups of flour. Note: Don’t worry about formatting the numbers in the output.
Computers and Technology
1 answer:
erastovalidia [21]2 years ago
6 0

Answer:

<em>This program is written using c++ programming language</em>

<em>Comments are used to explain difficult lines</em>

<em>See attachment for .cpp source files</em>

<em>Program starts here</em>

#include<iostream>

using namespace std;

int main()

{

// Calculate number of ingredient that makes up 48 cookies

float num_sugar = 1.5/48;

float num_butter =1.0/48;

float num_flour = 2.75/48;

//Declare integer variable to get number of cookies from user

int n;

// Prompt user for number of cookies needed

cout<<"Enter number of cookies: ";

cin>>n;

// Calculate equivalent amount of ingredient

num_sugar *= n;

num_butter *= n;

num_flour *= n;

// Display Result

cout<<"You need "<<num_sugar<<" cups of sugar, "<<num_butter<<" cups of butter, and "<<num_flour<<" cups of flour.";

return 0;

}

//End of Program

Download cpp
You might be interested in
which of the following is a component of a rope-rewind starter system? a. a recoil spring c. an air vane governor b. a wrist pin
Zinaida [17]
"Recoil spring" is the one among the following choices given in the question that is <span>a component of a rope-rewind starter system. The correct option among all the options that are given in the question is the first option or option "a". I hope that this is the answer that has come to your desired help.</span>
3 0
2 years ago
Write a for loop that iterates from 1 to numbersamples to double any element's value in datasamples that is less than minvalue.
CaHeK987 [17]

Answer:

function dataSamples=AdjustMinValue(numberSamples, userSamples, minValue)

dataSamples=userSamples;

%for loop

for i=1:numberSamples

%checking if dataSamples value at index,i

%is less than minValue

if dataSamples(i)<minValue

%set double of dataSamples value

dataSamples(i)= 2*dataSamples(i);

end

end

end

Explanation:

The given code is in MATLAB.

4 0
2 years ago
NumA = 3 <br>numB = 2<br>Result = numA ** numB
Paul [167]

Answer:

The result of the following code will be 9

Explanation:

There are several operators used in Python to do mathematical calculations.

** operator is used for exponents.

i.e.

a ** b mathematically means a^b

Here in the given code

3 is assigned to numA and 2 is assigned to numB

Result will be equal to 3^2

Hence,

The result of the following code will be 9

3 0
2 years ago
Create a division formula.
baherus [9]

Answer:

=(A4+B4+C4+D4+E4)/5

Explanation:

If we want to have the average of the passengers, first we must sum all the revenue and then divide it with passenger quantity.

In this particular example, I made the formula with 5 passengers, I sum the 5 revenues and then I divide with 5 passengers if there are more passengers we must sum all of them, and divided all of them, for example:

=(A4+B4+C4+D4+E4+F4)/6

4 0
3 years ago
The measure of the maximum amount of data that can travel through a computer’s communications path in a given amount of time is
STatiana [176]

Answer:

Bandwidth

Explanation:

Bandwidth is the rate of transfer of data in the given time. Its unit is Bit/sec.

It is used to measure the transfer rate of bit in a network.

4 0
3 years ago
Other questions:
  • Which string method counts the number of characters in a string?
    5·1 answer
  • Write a program that can be used to gather statistical data about the number of movies college students see in a month. The prog
    11·1 answer
  • When numbers are changed in cells that are involved in formula is the formulas are automatically
    14·1 answer
  • A bitmap picture can be represented by hexadecimal numbers. Each two-digit hexadecimal number represents a row. To convert a num
    14·1 answer
  • Hilary works at Klothes Kloset. She quickly helps the customers, and her cash drawer is always correct at the end of her shift.
    9·1 answer
  • Huh? translate this please. (jk, I know what it says I just want to test everyone.)
    13·1 answer
  • THis took FOREVER! please go check it out, if you have seen my demo to this game, you will like the full version! https://scratc
    9·2 answers
  • explain why you can determine machine epsilon on a computer using IEEE double precision and the IEEE Rounding to Nearest Rule by
    7·1 answer
  • How many operations can a computer perform every second?
    13·1 answer
  • You learned that "The CPU interacts with memory in a process that is known as
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!