Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to help someone with determining the amount of raw ingredients needed for their famous monster cookie recipe. A recipe that yields 3

Write a program to help someone with determining the amount of raw ingredients needed for their famous monster cookie recipe. A recipe that yields 3 monster cookies calls for the following ingredients:\ \ 1.50 cups of sugar\ 0.75 cup of butter\ 3.75 cups of flour\ 0.334 cups of cocoa\ Write a program that asks the user how many monster cookies the user wants to make then calculate and display the number of cups of each ingredient needed for the specified number of monster cookies. For instance, the following would be the output if the user wanted to make 9 monster cookies:\ \ To make 9 monster cookies, you will need:\ \ 4.50 cups of sugar\ 2.25 cups of butter\ 11.25 cups of flour\ 1.00 cups of cocoa\ \ Output requirements: The output must be rounded to the nearest hundreths of a decimal point (two places). Make sure you use the iomanip library file and the correct output manipulators to get the output rounded correctly, including displaying the 0 if the amount calculated is 1.5 (display must show 1.50). Make sure when you display the output that you provide more than just a series of numbers. Your output prompt must let the user know what your numbers represent (cups of butter, etc..)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Management Process

Authors: Lee Long

4th Edition

978-0201822939,0201822938

Students also viewed these Databases questions