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
/
DECIMAL.BAS
< prev
next >
Wrap
BASIC Source File
|
1984-04-29
|
3KB
|
116 lines
%INCLUDE HEADER
REM **********************DECIMAL*************************
REM SIMPLE EQUATIONS WITH DECIMALS
DRILL.NAME$="Simple Equations with Decimals"
PRINT
B=6
P=9
D=4
PRINT
PRINT "OK, "; N$;". Let's practice finding some missing numbers"
PRINT "in some simple equations which are composed of decimals."
PRINT " I'll give you a problem, you give me the answer, and I'll"
PRINT "check to see if your answer is correct."
PRINT
C=0
N=0
I=0
240 GOSUB 700
GOSUB 1200
IF A$ <> "C" THEN 300
C=C + 1
I = I + 1
GOTO 380
300 I = 0
PRINT " TRY AGAIN."
GOSUB 1200
IF A$ = "C" THEN 380
PRINT " TRY ONE MORE TIME."
GOSUB 1200
IF A$="C" THEN 380
PRINT " THE ANSWER IS ";A
380 IF I > P * C/N THEN 1000.2
IF N < 7 THEN 240
IF C/N >= .7 THEN 240
IF D = 1 THEN 240
D = D - 1
IF C/N >= .5 THEN 1000.2
D = 1
GOTO 240
PRINT
IF C <> N THEN 1000.2
D = D + 1
700 PRINT
N = N + 1
670 R = FNR(4)
R3 = FNR(2)
740 X=D
GOSUB 1150
A1=X
GOSUB 1150
A2=X
IF R=2 THEN 870
IF R=3 THEN 950
IF R=4 THEN 1000
A=A2
A2=A1+A2
A$="+"
GOTO 1100
870 IF R3=2 THEN 920
A=A1
A1=A1+A2
A$="-"
GOTO 1110
920 A=A1+A2
A$="-"
GOTO 1130
950 A=A2
A2=A1*A2
A$="*"
A2$=STR$(A2)
IF LEN(A2$)>9 THEN LET A2$=LEFT$(A2$,9)
A2=VAL(A2$)
IF A2 < .1 THEN 740
GOTO 1100
1000 IF R3=2 THEN 1060
A=A1
A1=A1*A2
A$="/"
PRINT "FIRST A1=";A1
A1$=STR$(A1)
IF LEN(A1$)>9 THEN LET A1$=LEFT$(A1$,9)
A1=VAL(A1$)
PRINT "A1=";A1
IF A1 < .1 THEN 740
GOTO 1110
1060 A=A1*A2
A$="/"
IF A < .1 THEN 740
GOTO 1130
1100 IF R3=2 THEN 1130
1110 PRINT " ",A1;A$;" ? =";A2;
GOTO 1140
1130 PRINT " ","? ";A$;A1;" =";A2;
1140 RETURN
1150 X=FNR(X)
1160 Z=INT(RND * 10^X)/10^INT(X * RND + 1)
IF Z < .1 THEN 1160
X=Z
RETURN
1200 PRINT " WHAT IS";
INPUT X$
RANDOMIZE
IF X$="QUIT" THEN GOTO 1000.2
X=VAL(X$)
IF X <> A THEN 1250
A$="C"
RETURN
1250 PRINT "NOT CORRECT. ";
I=0
A$=" I"
RETURN
%INCLUDE GRADE
END