CLS
INPUT "vvedite n"; n
INPUT "vvedite m"; m
DIM a(n, m)
FOR i = 1 TO n
FOR j = 1 TO m
PRINT "vvedite a("; i; ","; j; ")"
INPUT a(i, j)
NEXT
NEXT
CLS
PRINT "matrica"
FOR i = 1 TO n
FOR j = 1 TO m
PRINT a(i, j);
NEXT
PRINT
NEXT
PRINT "polozhitelnye"
FOR i = 1 TO n
FOR j = 1 TO m
IF a(i, j) > 0 THEN
PRINT a(i, j);
s = s + a(i, j)
END IF
sr = sr + a(i, j)
NEXT
NEXT
PRINT
PRINT "summa:"; s
sr = sr / (n * m)
PRINT "sr ="; sr
FOR i = 1 TO n
FOR j = 1 TO m
a(i, j) = a(i, j) / sr
NEXT
NEXT
PRINT "new matrica"
FOR i = 1 TO n
FOR j = 1 TO m
PRINT a(i, j);
NEXT
PRINT
NEXT
Тестирование выполнено в программе QB64 ( Скачать )