INPUT "vvedite kolichestvo strok ", m
INPUT "vvedite kolichestvo stolbcov ", n
DIM a(m, n), b(m), c(n)
RANDOMIZE TIMER
FOR i = 1 TO m
FOR j = 1 TO n
a(i, j) = INT(RND * 20)
NEXT
NEXT
PRINT "ishodnyj massiv"
FOR i = 1 TO m
FOR j = 1 TO n
PRINT a(i, j);
NEXT
PRINT
NEXT
FOR i = 1 TO m
FOR j = 1 TO n
b(i) = b(i) + a(i, j)
c(j) = c(j) + a(i, j)
NEXT
NEXT
PRINT "massiv summ strok"
FOR i = 1 TO m
PRINT b(i);
NEXT
PRINT
PRINT "massiv summ stolbcov"
FOR i = 1 TO n
PRINT c(i);
NEXT
PRINT
Тестирование выполнено в программе QB64 ( Скачать )