procedure large ( num_digits : integer; var largest : integer);
{pre : n is defined, largest is not
post : largest is tghe biggest number in the set}
var j, number : integer;
begin
largest := - maxint;
writeln(' type your ', num_digits, ' digits');
for j := 1 to num_digits do begin
read( number );
if number > largest then
largest := number
end
end;
var n , largest : integer;
begin
writeln('How many nuymbers will you be reading?');
readln( n );
large( n, largest );
writeln( 'the largest number is ', largest)
end.