INPUT n
DIM a(n, n)
FOR i = 1 TO n
FOR j = 1 TO n
INPUT "vvedite element "; 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
IF a(i, i) < 0 THEN s = 0: FOR j = 1 TO n: s = s + a(i, j): NEXT: PRINT "stroka "; i; " summa="; s
NEXT