CLS
INPUT "vvedite n"; n
DIM a(n, n), b(n, n)
FOR i = 1 TO n: FOR j = 1 TO n
PRINT "vvedite a("; i; ","; j; ")"
INPUT a(i, j)
NEXT: NEXT
CLS
FOR i = 1 TO n: FOR j = 1 TO n
PRINT a(i, j);
NEXT: PRINT: NEXT
PRINT STRING$(80, 196)
FOR i = 1 TO n \ 2: FOR j = i TO n - i
x = a(i, j)
a(i, j) = a(n - j + 1, i)
a(n - j + 1, i) = a(n - i + 1, n - j + 1)
a(n - i + 1, n - j + 1) = a(j, n - i + 1)
a(j, n - i + 1) = x
NEXT: NEXT
FOR i = 1 TO n: FOR j = 1 TO n
PRINT a(i, j);
NEXT: PRINT: NEXT
Тестирование выполнено в программе QB64 ( Скачать )