forked from KolibriOS/kolibrios
2f54c7de00
git-svn-id: svn://kolibrios.org@8097 a494cfbc-eb01-0410-851d-a64ba20cac60
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
(*
|
|
adapted to Oberon-07 by 0CodErr, KolibriOS team
|
|
*)
|
|
(* This program is a good example of proper formatting, it is *)
|
|
(* easy to read and very easy to understand. It should be a *)
|
|
(* snap to update a program that is well written like this. You *)
|
|
(* should begin to develop good formatting practice early in *)
|
|
(* your programming career. *)
|
|
|
|
MODULE TempConv;
|
|
|
|
IMPORT In, Out, Console;
|
|
|
|
|
|
VAR
|
|
Count : INTEGER; (* a variable used for counting *)
|
|
Centigrade : INTEGER; (* the temperature in centigrade *)
|
|
Farenheit : INTEGER; (* the temperature in farenheit *)
|
|
|
|
BEGIN
|
|
Console.open;
|
|
|
|
Out.String("Farenheit to Centigrade temperature table");
|
|
Out.Ln;
|
|
Out.Ln;
|
|
FOR Count := -2 TO 12 DO
|
|
Centigrade := 10 * Count;
|
|
Farenheit := 32 + Centigrade * 9 DIV 5;
|
|
Out.String(" C =");
|
|
Out.Int(Centigrade, 5);
|
|
Out.String(" F =");
|
|
Out.Int(Farenheit, 5);
|
|
IF Centigrade = 0 THEN
|
|
Out.String(" Freezing point of water");
|
|
END;
|
|
IF Centigrade = 100 THEN
|
|
Out.String(" Boiling point of water");
|
|
END;
|
|
Out.Ln;
|
|
END; (* of main loop *)
|
|
In.Ln;
|
|
|
|
Console.exit(TRUE)
|
|
END TempConv. |