home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
PASANS.ZIP
/
CH06_3.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-02-04
|
719b
|
36 lines
(* Chapter 6 - Programming exercise 3 *)
program First_Array;
const Size = 7;
var Product : array[1..Size,1..Size] of integer;
Row : integer;
Column : integer;
begin
for Row := 1 to Size do
for Column := 1 to Size do
Product[Row, Column] := Row * Column;
for Row := 1 to Size do begin
for Column := 1 to Size do
Write(Product[Row,Column]:4);
Writeln;
end;
end.
{ Result of execution
1 2 3 4 5 6 7
2 4 6 8 10 12 14
3 6 9 12 15 18 21
4 8 12 16 20 24 28
5 10 15 20 25 30 35
6 12 18 24 30 36 42
7 14 21 28 35 42 49
}