Question: In a file called lab 1 . c in your csci 1 1 2 _ spring 2 0 2 4 / labs / lab 1
In a file called labc in your cscispring labslab directory, write a program that estimates the temperature in a freezer in degrees Celsius given the elapsed time hours since a power failure. Assume this temperature $T is given by
where $$ is the time since the power failure. Your program should prompt the user to enter how long it has been since the start of the power failure in whole hours and minutes. Note that you will need to convert the elapsed time into hours. For example, if the user entered hours minutes you would need to convert this to hours.
Requirements
You must:
include the stdio library
use a constant macro preprocessor directive
Inputoutput format
For this assignment, you must match the output format exactly, and take input frttn the user precisely as described.
You must prompt the user as follows:
Hours and minutes since power outage? eg for hours, minutes
And you should print the result as follows, with exactly two numbers after the decimal point:
Estimated current temperature: degrees Celsius
Thus, a full run of your program might look like this:
Hours and minutes since power outage? eg for hours, minutes
Estimated current temperature: degrees Celsius
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
