主题:谁来帮我看看,程序哪写错了啊
INPUT N
INPUT K
DIM C(N)
FOR Z=1 TO N
INPUT C(N)
NEXT Z
DIM B(K)
FOR X = 1 TO K
INPUT B(X)
NEXT X
N=0
DIM A(73)
FOR I =1 TO 73
READ A(I)
DATA 278,167,158.....(就不全部写出,共73组3位数,而且全部为百>十>个)
NEXT I
FOR I= 1 TO 73
S =INT(A(I)/100)
D =A(I)-S*100
F =INT(D/10)
G =D-F*10
H = G - S
FOR X = 1 TO K
IF H = B(K)THEN GOTO 10:
GOTO 80:
10: FOR Z = 1 TO N
IF S=C(Z) THEN GOTO 60:
IF G=C(Z) THEN GOTO 60:
IF F=C(Z) THEN GOTO 60:
GOTO 70:
60: PRINT A(I);
N=N+1
70: NEXT Z
80: NEXT X
NEXT I
PRINT "YES";N
END
运行结果总是只有YES 0,不知道那里写错了,麻烦大家帮看看.
INPUT K
DIM C(N)
FOR Z=1 TO N
INPUT C(N)
NEXT Z
DIM B(K)
FOR X = 1 TO K
INPUT B(X)
NEXT X
N=0
DIM A(73)
FOR I =1 TO 73
READ A(I)
DATA 278,167,158.....(就不全部写出,共73组3位数,而且全部为百>十>个)
NEXT I
FOR I= 1 TO 73
S =INT(A(I)/100)
D =A(I)-S*100
F =INT(D/10)
G =D-F*10
H = G - S
FOR X = 1 TO K
IF H = B(K)THEN GOTO 10:
GOTO 80:
10: FOR Z = 1 TO N
IF S=C(Z) THEN GOTO 60:
IF G=C(Z) THEN GOTO 60:
IF F=C(Z) THEN GOTO 60:
GOTO 70:
60: PRINT A(I);
N=N+1
70: NEXT Z
80: NEXT X
NEXT I
PRINT "YES";N
END
运行结果总是只有YES 0,不知道那里写错了,麻烦大家帮看看.