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
unittttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
alukav5142 [94]
What the hell is the point of this, just to waist people's time?
5 0
3 years ago
A study by the Pew Internet and American Life Project reports that ________ percent of Americans research products and services
katrin2010 [14]

Options:

A. 40;35

B. 60;30

C; 70;35

D. 60;35

Answer:D) 60; 35.

Explanation:Pew Research center is a Private, nonpartisan fact tank, which conducts opinion polls on public related issues such Demographic,political,economic, religious and Environmental topics it was established in the year 2014 in Washington DC,United States of America.

Pew research center conducts it's opinion polls and research through various platforms such as Social media,internet, questionnaires etc.

3 0
3 years ago
To move or copy a range of cells, select the correct order:
Karo-lina-s [1.5K]

Answer:

Correct Order

2. Select the cell or range you want to move or copy.

1. Move the pointer over the border of the selection until the pointer changes shape.

3. To move the range, click the border and drag the selection to a new location, or to copy the range, hold down the Ctrl key and drag the selection to a new location.

Explanation:

To move or copy range of cells in MS Excel, You first select the cell/range you want to move or copy, hover the mouse pointer and take note when it changes shape, then finally click the border (when you noticed the change of shape of the pointer) and hold down the ctrl key and drag it to the destination location.

6 0
3 years ago
Which of the following correctly describes the syntax of an If statement?
Ber [7]

if(Expression to be tested) {

code to execute

} else if(Expression to be tested) {

code to execute

}


you can have as many else ifs as you want. But that's what it looks like.

8 0
4 years ago
Which program can damage your computer? can cause damage to my computer.
svetlana [45]

Answer:

Malware is designed to cause damage to a stand alone computer or a networked pc. So wherever a malware term is used it means a program which is designed to damage your computer it may be a virus, worm or Trojan.

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that prompts the user to enter integers in the range 1 to 50 and counts the occurrences of each integer. The pro
    13·1 answer
  • One way to describe the note-taking tool eNotes is to call it an electronic notebook. electronic sticky note. online web clippin
    5·2 answers
  • Suppose that a computer can read or write a memory word in 5 nsec. Also suppose that when an interrupt occurs, all 32 CPU regist
    10·2 answers
  • Need help with photography
    12·1 answer
  • 2. Write a Python regular expression to replace all white space with # in given string “Python is very simple programming langua
    14·1 answer
  • The program DebugTwo2.cs has syntax and/or logical errors. Determine the problem(s) and fix the program.// This program greets t
    5·1 answer
  • Qwertyuytrefgvbhnjkmjhgfvbnmjkuhytgfvbnmjkuyhgnjmkiuyhgbnmkloi<br><br> type pig latin now . . .
    14·2 answers
  • In Interactive Charting, which chart type allows you to chart the current spread between a corporate bond and a benchmark govern
    6·1 answer
  • 4. True or False: In order to use wi-fi signal/network, you have to remain seated in one spot.
    6·1 answer
  • A.m. client appears at the top of every page
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!