home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib19b.dsk
/
AVERAGE.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
446b
|
11 lines
10 REM --- FIND THE AVERAGE OF A SET OF DATA
20 PRINT : PRINT "** COPYRIGHT 1984 BY MICROSPARC, INC. **": PRINT CHR$(4);"BLOAD OVLY.OBJ": CALL 37088
30 PRINT : PRINT "DATA FILENAME OR": INPUT "<RETURN> TO END ?";F$: PRINT
40 IF F$ = "" THEN PRINT : END
50 & OVERLAY,500 -599,F$
60 RESTORE :SUM = 0:N = 0
70 READ X: IF X <0 THEN 100
80 SUM = SUM +X:N = N +1
90 GOTO 70
100 PRINT "THE AVERAGE OF ";N;" CASES WAS ";SUM/N
110 GOTO 30