program largest;
VAR count,loopcount:integer;
large,num:real;
begin
{ask user : how many number are to be input}
writeln('How many numbers will you input?');
readln(count);
{read that input number one at a time : use a loop}
{Prompt use to input 'count' numbers}
writeln('Please input ',count,' numbers');
{read in first number and asign to large}
read(num);
large := num;
for loopcount := 2 to count do begin
{read in one number}
read(num);
IF (num > large ) then
large := num;
{check if number is larger than previous largest number:
replace previous number if that is the case}
end;
{output the largest number}
writeln('The largest number is ', large);
readln;readln;
end.