5  REM   *** CONVERTED FROM THE ORIGINAL FOCAL PROGRAM TO BASIC BY
6  REM   *** DAVID AHL, DIGITAL
10 PRINT "I HAVE CHOSEN AN INTEGER 0 THROUGH 100.  TRY TO"
15 PRINT "GUESS MY NUMBER IN AS FEW TRIES AS POSSIBLE."
16 PRINT
20 LET C=0
22 RANDOMIZE
25	LET N = INT(RND*100)
30 LET C=C+1
35 PRINT "YOUR GUESS IS";
40 INPUT G
45 IF N=G THEN 70
50 IF G>N THEN 60
55 PRINT "TOO LOW"
56 GO TO 30
60 PRINT "TOO HIGH"
65 GO TO 30
70 PRINT "CORRECT IN";C;"GUESSES."
75 IF C>3 THEN 90
80 PRINT "YOU WERE LUCKY!"
85 STOP
90 IF C>7 THEN 100
95 PRINT "GOOD JOB."
98 GOTO 105
100 PRINT "BUT YOU SHOULDN'T NEED MORE THAN 7 GUESSES."
105 PRINT \PRINT "LET'S PLAY AGAIN"
110 PRINT "I'M THINKING OF ANOTHER NUMBER"\GOTO 20
999 END
