1 3 9 27
2 6 18 54
3 9 27 81
4 12 36 108
DIM a(4, 4)
FOR i = 1 TO 4
FOR j = 1 TO 4
a(i, j) = i * 3 ^ (j - 1)
IF a(i, j) = 54 THEN a(i, j) = 48
NEXT
NEXT
FOR i = 1 TO 4
FOR j = 1 TO 4
PRINT a(i, j);
NEXT
PRINT
NEXT
Тестирование выполнено в программе QB64 ( Скачать )