INPUT n
INPUT m
DIM a(n, m)
FOR i = 1 TO n
FOR j = 1 TO m
INPUT a(i, j)
NEXT
NEXT
FOR i = 1 TO n
FOR j = 1 TO m
PRINT a(i, j); " ";
NEXT
PRINT
NEXT
FOR i = 1 TO n
sum = 0
FOR j = 1 TO m
sum = sum + a(i, j)
NEXT
PRINT "srednee "; i; " stroki="; sum / m
NEXT
Тестирование выполнено в программе QB64 ( Скачать )