INPUT "vvedite n=", n
INPUT "vvedite m=", m
INPUT "vvedite a=", a
INPUT "vvedite b=", b
FOR i = 1 TO n
FOR j = 1 TO m
INPUT "vvedite ocherednoy element", 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
FOR j = 1 TO m
IF a(i, j) >= a AND a(i, j) <= b THEN s = s + a(i, j)
NEXT
NEXT
PRINT "summa="; s
Тестирование выполнено в программе QB64 ( Скачать )