REM
CLS
PRINT "Vvedite kolichestvo strok"
INPUT s
PRINT "Vvedite kolichestvo stolbtsov"
INPUT t
DIM tabl(1 TO s, 1 TO t) AS INTEGER
FOR i = 1 TO s
FOR j = 1 TO t
tabl(i, j) = 1 + INT(RND * 100)
PRINT tabl(i, j);
NEXT j
PRINT
NEXT i
max = tabl(1, 1)
min = tabl(1, 1)
FOR i = 1 TO s
FOR j = 1 TO t
IF max < tabl(i, j) THEN max = tabl(i, j)
IF min > tabl(i, j) THEN min = tabl(i, j)
NEXT j
NEXT i
PRINT "Maksimalnii element ="; max
PRINT "Minimalnii element ="; min
sr = (max + min) / 2
PRINT "Srednee maksimalnogo i minimalnogo ="; sr
END
Тестирование выполнено в программе QB64 ( Скачать )