langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
19
Task/Guess-the-number/Pascal/guess-the-number.pascal
Normal file
19
Task/Guess-the-number/Pascal/guess-the-number.pascal
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