Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Guess-the-number/Pascal/guess-the-number.pas
Normal file
19
Task/Guess-the-number/Pascal/guess-the-number.pas
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Program GuessTheNumber(input, output);
|
||||
|
||||
var
|
||||
number, guess: integer;
|
||||
|
||||
begin
|
||||
randomize;
|
||||
number := random(10) + 1;
|
||||
writeln ('I''m thinking of a number between 1 and 10, which you should guess.');
|
||||
write ('Enter your guess: ');
|
||||
readln (guess);
|
||||
while guess <> number do
|
||||
begin
|
||||
writeln ('Sorry, but your guess is wrong. Please try again.');
|
||||
write ('Enter your new guess: ');
|
||||
readln (guess);
|
||||
end;
|
||||
writeln ('You made an excellent guess. Thank you and have a nice day.');
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue