10 cls:dim suuji(30):seikaisu=0 20 for I=1 to 30:suuji(i)=0:next I 30 co=int(rnd(1)*30)+1 40 if seikaisu = 15 then print "perfect!!":end 50 if suuji(co)=1 then goto 30 else print co 60 for i=1 to 100000:next i:cls 70 suuji(co)=1 80 input my:cls 90 if my=0 or my>30 then print "hansokumake!!":end 100 if suuji(my)=1 then print "game over":print seikaisu:end 110 if suuji(my)=0 then seikaisu=seikaisu+1:suuji(my)=1 120 goto 30
10 cls:input n 20 dim suuji(n):seikaisu=0 30 for I=1 to n:suuji(i)=0:next I 40 co=int(rnd(1)*n)+1 50 if seikaisu = n/2 then print "perfect!!":end 60 if suuji(co)=1 then goto 40 else print co 70 for i=1 to 100000:next i:cls 80 suuji(co)=1 90 input my:cls 100 if my=0 or my>n then print "hansokumake!!":end 110 if suuji(my)=1 then print "game over":print seikaisu:end 120 if suuji(my)=0 then seikaisu=seikaisu+1:suuji(my)=1 130 goto 40