CLS
INPUT "Vvedite kol-vo stolbcov:", xl
INPUT "Vvedite kol-vo strok:", yl
DIM X(xl, yl) AS INTEGER, Sum, Min, NumStrok
' Zapolneniye matrici
FOR ix = 1 TO xl: FOR iy = 1 TO yl
X(ix, iy) = (RND * 101) - 50
NEXT: NEXT
' Poisk min summi
FOR iy = 1 TO yl: Sum = 0
FOR ix = 1 TO xl
Sum = Sum + X(ix, iy)
NEXT
IF iy = 1 THEN Min = Sum: NumStrok = 1
IF Sum < Min THEN Min = Sum: NumStrok = iy
NEXT
' Vivod rezultata
PRINT "matrica:"
FOR iy = 1 TO yl: FOR ix = 1 TO xl
PRINT X(ix, iy);
NEXT: PRINT: NEXT
PRINT "Min summa:"; Sum
PRINT "Nomer stroki"; NumStrok
Тестирование выполнено в программе QB64 ( Скачать )