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
/
ENTERPRS
/
CPM
/
UTILS
/
S
/
TPTUTOR1.ARC
/
PROG9.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-06-05
|
556b
|
26 lines
PROGRAM PROG9;
{$U+ Copyright (C), 1985 by Lyle Faurot. All rights reserved.
New Topics: FOR statement
":n" to specify field width in Write
}
VAR
Low, High, Index : Integer;
BEGIN
Write('Enter a number (may be negative): ');
ReadLn(Low);
Write('Enter a larger number: ');
ReadLn(High);
WriteLn;
WriteLn('Ascending');
FOR Index := Low to High DO
WriteLn(Index:10);
WriteLn('Descending');
FOR Index := High DownTo Low DO
WriteLn(Index:6);
END.