home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
turbopas
/
ttutor2.lbr
/
PROG11.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-08-02
|
512b
|
25 lines
PROGRAM PROG11;
{$U+ Copyright (C), 1985 by Lyle Faurot. All rights reserved.
New Topics: FUNCTION declaration
User defined function
}
VAR
No : Integer;
FUNCTION Cube(Number:Integer) : Integer;
BEGIN {Cube}
Cube := Number * Number * Number;
END; {Cube}
BEGIN {PROG11}
Write('Enter a number: ');
ReadLn(No);
WriteLn('The cube is: ', Cube(No) );
END. {PROG11}