CLS
RANDOMIZE TIMER
INPUT "vvedite n"; n
INPUT "vvedite m"; m
DIM a(n, m), b(n)
FOR i = 1 TO n: FOR j = 1 TO m
a(i, j) = FIX(RND * 100)
c(i) = a(i, 1)
NEXT: NEXT
FOR i = 1 TO n: FOR j = 1 TO m
PRINT a(i, j);
NEXT: PRINT: NEXT
PRINT STRING$(80, 196)
FOR i = 1 TO n: FOR j = 1 TO m
IF (i AND 1) = 0 THEN SWAP a(i, j), a(i - 1, j)
NEXT: NEXT
FOR i = 1 TO n: FOR j = 1 TO m
PRINT a(i, j);
NEXT: PRINT: NEXT
PRINT STRING$(80, 196)
FOR i = 1 TO n: FOR j = 1 TO m
IF a(i, j) > c(i) THEN c(i) = a(i, j)
NEXT: NEXT
FOR i = 1 TO n
PRINT c(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )