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

 
Output of file : CH06E3.MOD contained in archive : M2TUTOR.ZIP
(* Chapter 6 - Programming exercise 3 *)
MODULE CH06E3;

FROM InOut IMPORT WriteCard, WriteLn;

CONST MaxSize = 8;

VAR BigArray : ARRAY[1..MaxSize] OF ARRAY[1..MaxSize] OF CARDINAL;
Index1, Index2 : CARDINAL;

BEGIN

FOR Index1 := 1 TO MaxSize DO
FOR Index2 := 1 TO MaxSize DO
BigArray[Index1,Index2] := Index1 * Index2;
END;
END;

FOR Index1 := 1 TO MaxSize DO
FOR Index2 := 1 TO MaxSize DO
WriteCard(BigArray[Index1,Index2],4);
END;
WriteLn;
END;
END CH06E3.




(* Result of execution

1 2 3 4 5 6 7 8
2 4 6 8 10 12 14 16
3 6 9 12 15 18 21 24
4 8 12 16 20 24 28 32
5 10 15 20 25 30 35 40
6 12 18 24 30 36 42 48
7 14 21 28 35 42 49 56
8 16 24 32 40 48 56 64

*)



  3 Responses to “Category : Modula II Source Code
Archive   : M2TUTOR.ZIP
Filename : CH06E3.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/