home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
prgramer
/
pilot
/
average.pil
next >
Wrap
Text File
|
1993-08-01
|
208b
|
13 lines
R: Calculate average of given numbers
*REPEAT
T: Give a number, 0 quits:
A: #num
C: #sum = #sum + #num
C: #n = #n + 1
J(#num <> 0): *REPEAT
C: #n = #n - 1
C: #avg = #sum / #n
T: Average is #avg