Hello, i would like to use the Readln command to wait for the user to press
enter before ending the program.

1.First example - it works fine:

program hello;
    begin
      writeln('Hello world');
      readln;
    end.

2.Second example - it does not work.

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;

end.


Could anybody tell me why it does not work?
Thanks a lot

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to