Bulls and Cows Choosing a four digit number, the computer will respond to your guesses (or deductions, we hope) by displaying a bull when you get a correct digit in the right place, and a cow when a number you input also occurs in the computer's number, but not in the same place. You should note that the computer's number can have the same digit repeated. You can choose the number of guesses you're allowed, making it more difficult for yourself as you get more practised. 10 REM BULLS AND COWS 20 REM @ ROBERT ERSKINE 30 MODE 1 40 BORDER 0:INK 0,0:INK 1,24:INK 2,20:IN K 3,8:PAPER 0:PEN 1:CLS 50 LN=1 60 SYMBOL 251,0,2,3,255,126,126,66,66 70 SYMBOL 252,0,0,3,255,126,126,66,66 BOY GOTO 750 90 DIM N(4), A(4),H(4) 100 LN=1: R=RND:LOCATE 4,14:PRINT" HOW M ANY GUESSES DO YOU WANT";:INPUT T 110 GOSUB 380 120 CLS: LOCATE 10,14:PRINT"I HAVE CHOSE N A NUMBER":FOR X= 1 TO 1000:NEXT 130 GOSUB 430 140 FOR 0 = 1 TO T 150 LOCATE 1,23: PRINT"ENTER YOUR GUESS NOW E4 DIGITSJ";:INPUT G$:IF LEN (G$)<>4 THEN LOCATE 32,23:PRINT SPACE$(7);:GOTO 150 160 FOR F=1 TO 4:IF ASC(MID$(G$,F,1))<48 OR ASC(MID$(G$,F,1))>57 THEN LOCATE 32, 23:PRINT SPACE$(7);:GOTO 150:NEXT F 170 LOCATE 32,23:PRINT SPACE$(7); 180 GOSUB 250 190 GOSUB 460 200 IF BLACK<4 THEN NEXT 0:FOR X=1 TO 30 0:NEXT X:GOTO 600