aboutsummaryrefslogtreecommitdiff
path: root/game.bas
blob: 1757efb4cde2d40aca2d5c7bf3e41baa90917dbd (plain)
1
2
3
4
5
6
7
8
9
10
10 REM Guess a number
20 CLS : RANDOMIZE
30 LET n = INT(RND * 8) +1 : LET t = 1
100 INPUT "Guess a number from 1 to 9", g
120 PRINT "Your guess is "; g
130 IF g < n THEN PRINT "The number is bigger"
140 IF g > n THEN PRINT "The number is smaller"
150 IF g = n THEN GO TO 200
160 LET t = t + 1 : GO TO 100
200 PRINT "You won in "; t ; " turns"