Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
:- module alarm.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
main(!IO) :-
Temp = 80,
Thresh = 75,
io.write_string(if Temp > Thresh then "Alarm: Temperature Too High!\n" else "Temperature Normal\n", !IO).Coding works best on desktop or with an external keyboard.