DIM a(7, 7)
RANDOMIZE TIMER
FOR i = 1 TO 7
FOR j = 1 TO 7
a(i, j) = INT(RND * 20)
NEXT
NEXT
PRINT "massiv"
FOR i = 1 TO 7
FOR j = 1 TO 7
PRINT a(i, j);
NEXT
PRINT
NEXT
p = 1
FOR i = 1 TO 7
p = p * a(i, i)
NEXT
PRINT "proizvedenie glavnoy diagonali="; p
max1 = a(1, 1)
max3 = a(3, 1)
FOR j = 1 TO 7
IF a(1, j) > max1 THEN max1 = a(1, j)
IF a(3, j) > max3 THEN max3 = a(3, j)
NEXT
PRINT "raznost maximalnyh elementov max1-max3="; max1 - max3
Тестирование выполнено в программе QB64 ( Скачать )