RosettaCodeData/Task/Guess-the-number/Delphi/guess-the-number.delphi
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

19 lines
336 B
Text

program GuessTheNumber;
{$APPTYPE CONSOLE}
uses SysUtils;
var
theDigit : String ;
theAnswer : String ;
begin
Randomize ;
theDigit := IntToStr(Random(9)+1) ;
while ( theAnswer <> theDigit ) do Begin
Writeln('Please enter a digit between 1 and 10' ) ;
Readln(theAnswer);
End ;
Writeln('Congratulations' ) ;
end.