Category : Modula II Source Code
Archive   : M2TUTOR.ZIP
Filename : DUMBCONV.MOD

 
Output of file : DUMBCONV.MOD contained in archive : M2TUTOR.ZIP
(* Chapter 4 - Program 5 *)
MODULE DumbConv;
FROM InOut IMPORT WriteString, WriteInt, WriteLn;
VAR a, b, c : INTEGER;
BEGIN
WriteString("Fahrenheit to Centigrade temperature table");
WriteLn;
WriteLn;
FOR a := -2 TO 12 DO
b := 10 * a;
c := 32 + b *9 DIV 5;
WriteString(" C =");
WriteInt(b,5);
WriteString(" F =");
WriteInt(c,5);
IF b = 0 THEN
WriteString(" Freezing point of water");
END;
IF b = 100 THEN
WriteString(" Boiling point of water");
END;
WriteLn;
END; (* of main loop *)

END DumbConv.




(* Result of execution

Fahrenheit to Centigrade temperature table

C = -20 F = -4
C = -10 F = 14
C = 0 F = 32 Freezing point of water
C = 10 F = 50
C = 20 F = 68
C = 30 F = 86
C = 40 F = 104
C = 50 F = 122
C = 60 F = 140
C = 70 F = 158
C = 80 F = 176
C = 90 F = 194
C = 100 F = 212 Boiling point of water
C = 110 F = 230
C = 120 F = 248

*)



  3 Responses to “Category : Modula II Source Code
Archive   : M2TUTOR.ZIP
Filename : DUMBCONV.MOD

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/