Question: 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
To create a program that calculates the ingredients needed for a desired number of monster cookies well use basic arithmetic and output formatting tec... View full answer
Get step-by-step solutions from verified subject matter experts
