min = 1E+38
INPUT n
PRINT min
DIM a(n, n)
FOR i = 1 TO n
FOR j = 1 TO n
INPUT a(i, j)
NEXT
NEXT
FOR i = 1 TO n
FOR j = 1 TO n
PRINT a(i, j); " ";
NEXT
PRINT
NEXT
FOR i = 1 TO n
FOR j = 1 TO n
IF i + j < n + 1 THEN sum = sum + a(i, j): IF a(i, j) > 0 AND a(i, j) < min THEN min = a(i, j): imin = i: jmin = j
NEXT
NEXT
PRINT "summa= "; sum
IF min = 1E+38 THEN PRINT "polojitelnyh net" ELSE PRINT "min="; min; "i="; imin; "j="; jmin
Тестирование выполнено в программе QB64 ( Скачать )