Question: Problem 1 Beverages such as coffee, hot chocolate, or tea are often served at temperatures between 1 6 0 and 1 8 5 degrees Fahrenheit.
Problem
Beverages such as coffee, hot chocolate, or tea are often served at temperatures between and degrees
Fahrenheit. However, beverages consumed at such high temperatures can cause scalding burns. According to a recent
research study, the optimal temperature to avoid burns when consuming a warm beverage is approximately degrees
Fahrenheit.
To obtain a simple solution, let's assume that for EACH ice cube added to a hot beverage, the temperature of the beverage
will be reduced by of the current beverage temperature.
Write a function to complete the following tasks:
Use the appropriate input mechanism to obtain the initial temperature between and degrees Fahrenheit
of the hot beverage.
Add an ice cube one at a time assume the simple temperature reduction described above until the temperature
of the beverage is optimal ie below degrees Fahrenheit HINT: What type of loop should you use to
accomplish this task?
Count the number of ice cubes necessary to achieve an optimal temperature.
Use the appropriate output mechanism to output the number of ice cubes needed and the final temperature.
Solution for an initial temperature of degrees Fahrenheit:
numcubes
temp
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
