SELF TEST
What does the following program display on the screen.
program ARRAY_TEST (output);
var numbers : ARRAY [1..5] of integer;
begin
numbers[1] := 7;
numbers[2] := 13;
numbers[3] := numbers[2] - 1;
numbers[4] := numbers[3] DIV 3;
numbers[5] := numbers[3] DIV numbers[4];
for loop := 1 to 5 do
writeln('Numbers[',loop,'] is', numbers[loop] )
end.
Self Test .. Output of ARRAY_TEST is..
Numbers[1] is 7
Numbers[2] is 13
Numbers[3] is 12
Numbers[4] is 4
Numbers[5] is 3
Copyright B Brown/P Henry/CIT, 1988-1997. All rights reserved.