Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Miniature Edutainment Game in GW-BASIC. A minor tribute to the first programming language I came in contact with. Back when Pangea was still a thing. ;)
110 REM the sum of parts. GW-Basic edition
120 A$ = ""
125 RANDOMIZE TIMER
130 FOR I=0 TO 19
140 N% = INT(RND(1)*10)
150 S% = S% + N%
160 A$ = A$ + CHR$(48+N%) + "+"
170 NEXT
180 A$ = LEFT$(A$,LEN(A$)-1) + "="
190 CLS: LOCATE 12,1: PRINT A$
200 T = TIMER
202 IF TIMER < T+10 THEN 202
210 CLS
220 R% = 1
230 INPUT "Solution"; I%: if I% <> S% THEN 900
800 PRINT "Correct!"
802 BEEP
810 T = TIMER
815 IF TIMER < T+2 THEN 815
820 R% = R% + S%
830 GOTO 180
900 PRINT "Score:"; R%; "Sum:"; S%
910 END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.