home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
TURBOPAS
/
TTUTOR1.LBR
/
PROG7.PQS
/
PROG7.PAS
Wrap
Pascal/Delphi Source File
|
2000-06-30
|
1KB
|
42 lines
PROGRAM PROG7;
{$U+ Copyright (C), 1985 by Lyle Faurot. All rights reserved.
New Topics: REPEAT statement
CHAR data type
}
VAR
Response : Char;
Correct_Response : Boolean;
BEGIN
WriteLn('Turbo Pascal seems to ');
WriteLn;
WriteLn('A. Run faster than other Pascals.');
WriteLn('B. Compile faster than others.');
WriteLn('C. Take less room in memory.');
WriteLn('D. All of the above.');
WriteLn;
REPEAT
Write('Enter your choice - A, B, C, or D: ');
ReadLn(Response);
WriteLn;
If (Response = 'D') or (Response = 'd')
THEN
Correct_Response := True
ELSE
Correct_Response := False;
If Correct_Response
THEN
WriteLn('Right!')
ELSE
WriteLn('Wrong choice, try again.');
UNTIL Correct_Response;
END.