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
/
SIMTEL
/
CPMUG
/
CPMUG037.ARK
/
VOLUME.BAS
< prev
next >
Wrap
BASIC Source File
|
1984-04-29
|
2KB
|
89 lines
%INCLUDE HEADER
REM **********************VOLUME******************************
REM METRIC CONVERSIONS OF VOLUME
DRILL.NAME$="Metric Conversions of Volume"
PRINT
B=11
DIM C(3), E$(3), M$(3)
DATA 16.387064, "CUBIC INCHES", "CUBIC CENTIMETERS"
DATA .028316847, "CUBIC FEET", "CUBIC METERS"
DATA 3.785306, "GALLONS", "LITERS"
P=9
D=4
PRINT
PRINT "OK ";N$;". Let's practice converting some english units of"
PRINT "volume to their metric equivalents. I will give you a problem"
PRINT "and you give me your answer, which I will check. If you need"
PRINT "some help, enter -1 instead of an answer."
PRINT
PRINT "Your answer should be correct to the nearest hundredth."
PRINT
C=0
N=0
I=0
300 GOSUB 710
GOSUB 930
IF A$ <> "C" THEN 360
C=C + 1
I = I + 1
GOTO 440
360 I = 0
PRINT " TRY AGAIN."
GOSUB 930
IF A$ = "C" THEN GOTO 440
PRINT " TRY ONE MORE TIME."
GOSUB 930
IF A$="C" THEN GOTO 440
PRINT " THE ANSWER IS ";A
440 IF I > P * C/N THEN 1000.2
IF N < 7 THEN GOTO 300
IF C/N >= .7 THEN GOTO 300
IF D = 1 THEN GOTO 300
D = D - 1
IF C/N >= .5 THEN GOTO 300
D = 1
GOTO 300
710 PRINT
N = N + 1
730 R = FNR(3)
R3 = FNR(D^2) + 1
GOSUB 780
A = R3 * C
RETURN
780 RESTORE
FOR Q=1 TO R
READ C, E$,M$
NEXT Q
PRINT "HOW MANY ";M$;" ARE IN";R3;E$;
RETURN
840 PRINT
RESTORE
FOR J=1 TO 3
READ C, E$, M$
PRINT "TO COVERT FROM ";E$; " TO ";M$
PRINT " MULTIPLY BY";C;"."
PRINT
NEXT J
RETURN
930 INPUT LINE X$
RANDOMIZE
IF X$="QUIT" THEN GOTO 1000.2
X=VAL(X$)
IF X < 0 THEN GOTO 980
IF ABS(X-A) > .005 THEN GOTO 1030
A$ = "C"
RETURN
980 GOSUB 840
PRINT
PRINT "HERE IS YOUR PROBLEM AGAIN:"
GOSUB 780
GOTO 930
1030 PRINT "NOT CORRECT. ";
I = 0
A$ = "I"
RETURN
%INCLUDE GRADE
END