Примеры программ на языке QBASIC


DEFLNG A-Z
DIM Xam(1000)
CLS
Xam(0) = 1
PRINT 1, 1
FOR J = 1 TO 999
  x2 = Xam(k2) * 2
  x3 = Xam(k3) * 3
  x5 = Xam(k5) * 5
  IF x2 <= x3 AND x2 <= x5 THEN Xam(J) = x2: k2 = k2 + 1
  IF x3 <= x2 AND x3 <= x5 THEN Xam(J) = x3: k3 = k3 + 1
  IF x5 <= x2 AND x5 <= x3 THEN Xam(J) = x5: k5 = k5 + 1
  PRINT USING "###:##########  "; J; Xam(J);
  REM Приостанов после заполнения экрана
  IF J MOD 115 = 0 THEN INPUT A$
NEXT J
END