[fpc-devel] readln problem
L
L at z505.com
Mon Oct 29 15:48:35 CET 2007
> Something like this solves your problem
>
> program NUMBERS (Input,Output);
> var A,B : Integer;
> begin
> Write ('Find greater number.');
> Write ('Enter two numbers.');
> Read (A,B);
> if A>B then Write ('The greater number is ',A)
> else
> Write ('The greater number is ',B);
> readln;
> readln;
> end.
Alternatively:
program NUMBERS (Input,Output);
var A,B : Integer;
begin
Write ('Find greater number.');
Write ('Enter two numbers.');
Read (A,B);
readln;
if A>B then Write ('The greater number is ',A)
else
Write ('The greater number is ',B);
readln;
end.
More information about the fpc-devel
mailing list