• CLS FOR t1 = 0 TO 3 FOR t2 = 0 TO 7 FOR t3 = 0 TO 14 k = 20 * t1 + 10 * t2 + 5 * t3 IF k = 70 THEN PRINT t1, t2, t3 NEXT t3 NEXT t2 NEXT t1 END
• CLS INPUT "Enter the first base of your number : ", b1 PRINT " Enter your number in base "; b1; " : "; INPUT n INPUT " Enter the second base : ", b2 m=n i=0 num = 0 WHILE m > 0 i=i+1 k = m MOD 10 m = m \ 10 num = num + k * b1 ^ (i - 1) WEND i=0 n2 = 0 WHILE num > 0 i=i+1 k = num MOD b2 num = num \ b2 n2 = n2 + k * 10 ^ (i - 1) WEND PRINT n2 END
• DIM a(2, 2), b(2, 8, 2) INPUT " first horse "; a(1, 1), a(1, 2) INPUT " second horse "; a(2, 1), a(2, 2) FOR i = 1 TO 2 n=1 FOR j = -2 TO 2 IF j <> 0 THEN b(i, n, 1) = a(i, 1) + j b(i, n + 1, 1) = a(i, 1) + j b(i, n, 2) = a(i, 2) + ABS(j) - 3 b(i, n + 1, 2) = a(i, 2) + 3 - ABS(j) n=n+2 END IF NEXT j NEXT i a = 7: SCREEN 12 FOR i = 20 TO 7 * 75 + 20 STEP 75 a=7-a FOR j = 20 TO 7 * 50 + 20 STEP 50 a=7-a LINE (i, j)-STEP(75, 50), a, BF NEXT j NEXT i FOR i = 1 TO 2 CIRCLE (a(i, 1) * 75 - 20, a(i, 2) * 50 - 5), 10 NEXT i FOR i = 1 TO 2 FOR j = 1 TO 8 x = b(i, j, 1): y = b(i, j, 2) IF x < 9 AND x > 0 AND y < 9 AND y > 0 THEN LINE (x * 75 - 55, y * 50 - 30)-STEP(75, 50), 14, BF END IF NEXT j NEXT i FOR i = 1 TO 8 FOR j = 1 TO 8 x1 = b(1, i, 1): y1 = b(1, i, 2) x2 = b(2, j, 1): y2 = b(2, j, 2) IF x1 < 9 AND x1 > 0 AND y1 < 9 AND y1 > 0 THEN IF x1 = x2 AND y1 = y2 THEN LINE (x1 * 75 - 55, y1 * 50 - 30)-STEP(75, 50), 4, BF END IF END IF NEXT j NEXT i