DIM a(6, 9)
RANDOMIZE TIMER
FOR i = 1 TO 6
FOR j = 1 TO 9
a(i, j) = INT(RND * 100)
NEXT
NEXT
PRINT "massiv"
FOR i = 1 TO 6
FOR j = 1 TO 9
PRINT a(i, j);
NEXT
PRINT
NEXT
min = a(1, 1)
max = a(1, 1)
FOR i = 1 TO 6
FOR j = 1 TO 9
IF a(i, j) > max THEN max = a(i, j)
IF a(i, j) < min THEN min = a(i, j)
NEXT
NEXT
PRINT "min="; min
PRINT "max="; max
PRINT "srednee max i min="; (max + min) / 2
Тестирование выполнено в программе QB64 ( Скачать )