100:RANDOM : WAIT 0:AN=12
110
IM LV(5,4)
120:FOR Y=0 TO 4
130:FOR X=0 TO 5
140:READ LV(X,Y)
150:NEXT X
160:NEXT Y
170:INPUT "Schwierigkeitsgrad (1-5)?",S:S=S-1
180:RI=0
190:FOR I=1 TO AN
200:A= RND 4
210
A=100+(S+1)*(A+11)
220:IF A<>1 THEN 280
230:E1= RND (LV(1,S)-LV(0,S))+LV(0,S):E2= RND (LV(1,S)-LV(0,S))+LV(0,S)
240:ER=E1+E2
250:AU$= STR$ (E1)+"+"+STR$ (E2)+"=":AL= LEN (AU$)
260
RINT AU$: GOSUB 700
270:GOTO 480
280:IF A<>2 THEN 350
290:E1= RND (LV(1,S)-LV(0,S))+LV(0,S):E2= RND (LV(1,S)-LV(0,S))+LV(0,S)
300:IF E1<E2 THEN LET H=E1:E1=E2:E2=H
310:ER=E1-E2
320:AU$= STR$ (E1)+"-"+STR$ (E2)+"=":AL= LEN (AU$)
330
RINT AU$: GOSUB 700
340:GOTO 480
350:IF A<>3 THEN 410
360:E1= RND (LV(3,S)-LV(2,S))+LV(2,S):E2= RND (LV(5,S)-LV(4,S))+LV(4,S)
370:ER=E1*E2
380:AU$= STR$ (E1)+"*"+STR$ (E2)+"=":AL= LEN (AU$)
390
RINT AU$: GOSUB 700
400:GOTO 480
410:IF A<>4 THEN 480
420:E1= RND (LV(3,S)-LV(2,S))+LV(2,S):E2= RND (LV(5,S)-LV(4,S))+LV(4,S)
430:H=E1:ER=E1:E1=H*E2
440:ER=E1/E2
450:AU$= STR$ (E1)+"/"+STR$ (E2)+"=":AL= LEN (AU$)
460
RINT AU$: GOSUB 700
470:GOTO 480
480:WAIT 100
500:CURSOR AL+24: PRINT " ";ER;" "
510:CURSOR AL
520:IF ER<> VAL (ER$) THEN GOTO 560
530
RINT " RICHTIG"
570:WAIT 0
580:NEXT I
590:WAIT 100
600
RINT "Richtig sind ";RI;" von ";AN
610
RINT "Note ";6- INT ((5/AN*RI)+0.5)
620:END
700:ER$=""
710:FOR J=1 TO DA
720:C$= INKEY$
730:IF C$="=" THEN LET J=DA
740:IF C$<>"-" THEN GOTO 780
750:ER$= MID$ (ER$,1,LEN ER$-1)
760:CURSOR AL: PRINT " "
770:GOTO 790
780:ER$=ER$+C$
790:USING "#####":CURSOR AL: PRINT VAL ER$
800:NEXT J
810:RETURN
900
ATA 2,9,2,5,2,5
910
ATA 9,50,3,9,3,9
920
ATA 100,300,3,9,11,19
930
ATA 300,1000,11,19,19,50
940
ATA 1000,5000,19,50,19,50