Найдите ошибку в 7 строке(qbasic) : cls k = 0 dim b(k) input n for i = 1 to n input a if a > 0 and a mod 3 = 0 then k=k+1 : b(k) = a next i if k > 0 then goto 10 else goto 20 c = k 10 for d = c to 1 print b(k) next d end 20 print -1 end
CLS K = 0 DIM B(10000) INPUT N FOR i = 1 TO N INPUT A IF A > 0 AND (A MOD 3) = 0 THEN K = K + 1: B(K) = A NEXT i IF K > 0 THEN GOTO 10 ELSE GOTO 20 10 : C = K FOR D = C TO 1 STEP -1 PRINT B(D) NEXT D END 20 : PRINT -1 END
K = 0
DIM B(10000)
INPUT N
FOR i = 1 TO N
INPUT A
IF A > 0 AND (A MOD 3) = 0 THEN K = K + 1: B(K) = A
NEXT i
IF K > 0 THEN GOTO 10 ELSE GOTO 20
10 :
C = K
FOR D = C TO 1 STEP -1
PRINT B(D)
NEXT D
END
20 :
PRINT -1
END