-
This is a solution for the question below:
- Write and test a program to complete the three tasks. The temperature in an apartment needs to be kept between 22°C and 24°C. This is done by the use of an automatically controlled air-conditioning system, which monitors the temperature every five minutes. The temperature of the apartment is recorded, to one decimal place, in degrees Celsius. The cooling is activated when the temperature reaches 24.5°C and the heating is activated when the temperature reaches 21.5°C.
- To simulate the monitoring required, write a routine that allows entry of the apartment’s temperature in degrees Celsius. The routine checks whether the temperature is within the acceptable range, too high or too low and outputs a suitable message in each case.
- Write another routine that stores, in an array, the temperatures taken over a period of five hours. This routine calculates the difference between the highest temperature and the lowest temperature. Then it outputs the highest temperature, the lowest temperature, and the difference between these temperatures.
- Write a routine to find out how often the temperature was out of the acceptable range during the five hours and whether the temperature was too high or too low; output a suitable message showing a summary of the problem.
-
Notifications
You must be signed in to change notification settings - Fork 0
v1peridae/temperature-check-system
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
This is a solution to the pre-release material in the O/N 2015 exam series.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published