DIM a(7, 7)
RANDOMIZE TIMER
PRINT "massiv"
FOR i = 1 TO 7
FOR j = 1 TO 7
a(i, j) = INT(RND * 9) + 1
PRINT a(i, j);
NEXT
PRINT
NEXT
p = 1
FOR i = 1 TO 7
p = p * a(i, i)
NEXT
PRINT "proizvedenie gl.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 max1-max3="; max1 - max3
Тестирование выполнено в программе QB64 ( Скачать )