CLS
m = 5
DIM a(m, m)
RANDOMIZE TIMER
FOR i = 1 TO m
FOR j = 1 TO m
a(i, j) = INT(RND * 100) - 50
NEXT j
NEXT i
FOR i = 1 TO m
FOR j = 1 TO m
PRINT a(i, j);
NEXT j
PRINT
NEXT i
PRINT
FOR i = 1 TO m
s = 0
FOR j = 1 TO m
s = s + a(i, j)
NEXT j
s = s / m: PRINT "sredneye arifm stroki #"; i; "="; s
NEXT i
Тестирование выполнено в программе QB64 ( Скачать )