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]
3 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]3 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
4.In order for a driver to graduate from a learner’s license to an operator’s license, how many hours of driving need to be docu
Illusion [34]

Answer and Explanation

In the United States of America, driver's licenses are issued by each individual state, territory.

In order for a driver to graduate from a learner's license to an operator's license, how many hours of driving you need to be documented is 50 hours, of which 10 hours must be at night.To move on to your intermediate driver's license, you must: Be at least 16 years old .

8 0
3 years ago
Which of the following is the component of the processor that directs and coordinates most of the operations in the computer?A.
drek231 [11]

Answer:

C. control unit.

Explanation:

A processor is a miniaturized central processing unit a in digital system that interconnects and controls the activities of other components in the device.

The components of a microprocessor are the bus, registers, cache memory, arithmetic and logical unit and the central or control unit.

The bus is the transportation medium for all activities in the processor. The registers like the accumulator and the B register are memory locations used to hold the operand of an operation.The cache memory holds data meant for immediate use by the processor. Arithmetic and logical unit carries out the various arithmetic and logical operation in the processor, while the control unit is responsible for handling or managing all activities in the processor.

5 0
3 years ago
PLEASE HELP!!!!!!!!!!
Shtirlitz [24]
<em>If i was answering this question I would pick D. Because a job is an organization of people working there and the people that work there have a strategic roll on the organization they work for because that's how they make their living!
</em>
7 0
3 years ago
Read 2 more answers
 A number of companies and/or agencies, such as National ____ and Atmospheric Administrationâs National Weather Service, provid
LekaFEV [45]

Answer: D) Oceanic

Explanation:

National oceanic and the atmospheric administration (NOAA)are the national weather services which basically provide the weathering conditions and forecast them on their particular websites.

NOAA is basically responsible for monitoring or environment and climate. this agency is situated in the united state at washington headquarter. It also helps to preserve the climate by taking some effective steps for our environment.  

4 0
3 years ago
Who do u play as in sister location
seropon [69]
Well, it really depends on who you believe, because i have a lot of friends who say it is Purple Guy, but i have others that say you just play as an unknown character. So, i would go with Purple Guy, but I'm only like 85 percent sure.
5 0
3 years ago
Read 2 more answers
Other questions:
  • A computer has a memory ________, rather than just a single memory component. The lowest level is some form of ________ storage
    11·1 answer
  • What is the name of the port that you plug an ethernet network cable into?
    6·1 answer
  • What is the internet?
    5·2 answers
  • An application is to be written that would allow students to find out their GPA(double) and their total number of credits (an in
    15·1 answer
  • 33 points!!!!!!!!!!pls help
    15·1 answer
  • technician is dispatched to troubleshoot a user's computer. After performing diagnostics, the technician determines that drive t
    5·1 answer
  • ...................is a high level, structured , open source programming language​
    10·1 answer
  • 4.3 Code Practice: Question 1
    12·2 answers
  • Which is the first computer brought in nepal for the census of 2028 B.S​
    6·1 answer
  • How do I add a Child to my Brainly account
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!