1- A hurricane hit Florida and the freezer is out of power!! Write a program that estimates the temperature in a freezer (in °C) given the elapsed time (hours) since the power failure happened. Assume this temperature (T) is given by 4t? T = t + 2 20 where t is the time since a power failure. You can tell that the freezer temperature is normally set to -20 °C. a) Your program should prompt the user to enter how long it has been since the start of the freezer power failure in whole hours and minutes. You should also sympathize with the user b) You would need to convert the elapsed time into hours. For example, if the user entered 2 30 (2 hours 30 minutes), you would need to convert this to 2.5 hours. c) Your program should then calculate the freezer temperature in Celsius degrees. Note: the temperature of the freezer should increase as the power failure time lapse increases. This is a good test to run your program at different times (t) and test for correctness of the program. d) Convert that calculated temperature to degrees Fahrenheit using the following equation: °F = (°C x 9/5) + 32 e) You should display the current temperature of the freezer in both °C and "F based on the time elapsed since the power failure. Use output formatting to round to 1 decimal point. f) Ice cream melts at about -10 °C. Write a condition that checks whether the current freezer temperature has reached -10 °C or not. Print the result of that condition check (either 1 or 0). That serves as a flag to the user; If the freezer has reached that temperature, the user should know that it's 'bye bye ice cream time'. g) Now, steak and meat get spoiled at about +4.5 °C. Write a condition that checks whether the current temperature is above 4.5 °C or not. Based on the result of this condition, print a message to the user and let them know to discard their meat and poultry products.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

in C

1- A hurricane hit Florida and the freezer is out of power!!! Write a program that estimates the
temperature in a freezer (in °C) given the elapsed time (hours) since the power failure happened.
Assume this temperature (T) is given by
4t2
T = -
– 20
t+2
where t is the time since a power failure. You can tell that the freezer temperature is normally
set to -20 °C.
a) Your program should prompt the user to enter how long it has been since the start of the freezer
power failure in whole hours and minutes. You should also sympathize with the user
b) You would need to convert the elapsed time into hours. For example, if the user entered 2 30
(2 hours 30 minutes), you would need to convert this to 2.5 hours.
c) Your program should then calculate the freezer temperature in Celsius degrees.
Note: the temperature of the freezer should increase as the power failure time lapse increases.
This is a good test to run your program at different times (t) and test for correctness of the
program.
d) Convert that calculated temperature to degrees Fahrenheit using the following equation:
°F = (°Cx 9/5) + 32
e) You should display the current temperature of the freezer in both °C and °F based on the time
elapsed since the power failure. Use output formatting to round to 1 decimal point.
f) Ice cream melts at about -10 °C. Write a condition that checks whether the current freezer
temperature has reached -10 °C or not. Print the result of that condition check (either 1 or 0).
That serves as a flag to the user; If the freezer has reached that temperature, the user should
know that it's 'bye bye ice cream time'.
g) Now, steak and meat get spoiled at about +4.5 °C. Write a condition that checks whether the
current temperature is above 4.5 °C or not. Based on the result of this condition, print a message
to the user and let them know to discard their meat and poultry products.
Transcribed Image Text:1- A hurricane hit Florida and the freezer is out of power!!! Write a program that estimates the temperature in a freezer (in °C) given the elapsed time (hours) since the power failure happened. Assume this temperature (T) is given by 4t2 T = - – 20 t+2 where t is the time since a power failure. You can tell that the freezer temperature is normally set to -20 °C. a) Your program should prompt the user to enter how long it has been since the start of the freezer power failure in whole hours and minutes. You should also sympathize with the user b) You would need to convert the elapsed time into hours. For example, if the user entered 2 30 (2 hours 30 minutes), you would need to convert this to 2.5 hours. c) Your program should then calculate the freezer temperature in Celsius degrees. Note: the temperature of the freezer should increase as the power failure time lapse increases. This is a good test to run your program at different times (t) and test for correctness of the program. d) Convert that calculated temperature to degrees Fahrenheit using the following equation: °F = (°Cx 9/5) + 32 e) You should display the current temperature of the freezer in both °C and °F based on the time elapsed since the power failure. Use output formatting to round to 1 decimal point. f) Ice cream melts at about -10 °C. Write a condition that checks whether the current freezer temperature has reached -10 °C or not. Print the result of that condition check (either 1 or 0). That serves as a flag to the user; If the freezer has reached that temperature, the user should know that it's 'bye bye ice cream time'. g) Now, steak and meat get spoiled at about +4.5 °C. Write a condition that checks whether the current temperature is above 4.5 °C or not. Based on the result of this condition, print a message to the user and let them know to discard their meat and poultry products.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education