Enjoy programming more!
Kidspod is a post site which supports young programmers.
First step to join us.
Register as a member
For members

2018/06/14 14:22:12

MixJuice GET URL : kidspod.club/mj/496

習作 OPEN!

L 解錠キー ABCDに分割
X 入力キー EFGHに分割
比較してヒントを表示する。

  • No registered tag exist.

SOURCE CODE

10 CLS
20 L=RND(10000)
30 R=L
40 A=R/1000:R=R-A*1000
50 B=R/100:R=R-B*100
60 C=R/10:R=R-C*10
70 D=R
80 PRINT "XXXX"
90 @LOOP
100 INPUT "",X
110 PRINT
120 R=X
130 E=R/1000:R=R-E*1000
140 F=R/100:R=R-F*100
150 G=R/10:R=R-G*10
160 H=R
170 IF A=E THEN PRINT A;ELSE PRINT "X";
180 IF B=F THEN PRINT B;ELSE PRINT "X";
190 IF C=G THEN PRINT C;ELSE PRINT "X";
200 IF D=H THEN PRINT D;ELSE PRINT "X";
210 PRINT
220 IF L=X THEN PRINT "OPEN!":END
230 GOTO@LOOP

COMMENT