[fpc-devel] readln problem

Petr Katovsky petr at katovsky.cz
Mon Oct 29 15:06:55 CET 2007


Yes, it's working fine.
Thank you a lot.

-----Original Message-----
From: fpc-devel-bounces at lists.freepascal.org
[mailto:fpc-devel-bounces at lists.freepascal.org] On Behalf Of L
Sent: Monday, October 29, 2007 3:49 PM
To: f dvl list
Subject: Re: [fpc-devel] readln problem

> 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.

_______________________________________________
fpc-devel maillist  -  fpc-devel at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel




More information about the fpc-devel mailing list