主题:[原创]小球屏保
密码是1
CLS
INPUT "N,M="; N, M
DIM A(M, M)
FOR I = 1 TO M
FOR J = 1 TO M
A(I, J) = INT(RND * 2)
IF A(I, J) = 1 THEN S = S + 1
IF S = N THEN EXIT FOR
NEXT J
NEXT I
FOR I = 1 TO M * M
Q = 0
INPUT A, B
IF A(A, B) = 1 THEN PRINT "game over!": END
IF A(A, B) = 0 THEN A(A, B) = 1
FOR I1 = 1 TO M
FOR I2 = 1 TO M
IF A(I1, I2) <> 1 THEN Q = 1
IF Q = 0 THEN PRINT "win": END
NEXT I2, I1
NEXT I
CLS
INPUT "N,M="; N, M
DIM A(M, M)
FOR I = 1 TO M
FOR J = 1 TO M
A(I, J) = INT(RND * 2)
IF A(I, J) = 1 THEN S = S + 1
IF S = N THEN EXIT FOR
NEXT J
NEXT I
FOR I = 1 TO M * M
Q = 0
INPUT A, B
IF A(A, B) = 1 THEN PRINT "game over!": END
IF A(A, B) = 0 THEN A(A, B) = 1
FOR I1 = 1 TO M
FOR I2 = 1 TO M
IF A(I1, I2) <> 1 THEN Q = 1
IF Q = 0 THEN PRINT "win": END
NEXT I2, I1
NEXT I