CLS
INPUT "vv. kol-vo strok ", n
INPUT "vv. kol-vo stolbcov ", m
DIM c(n, m)
RANDOMIZE TIMER
FOR i = 1 TO n
FOR j = 1 TO m
c(i, j) = INT(RND * 20) - 10
NEXT
NEXT
PRINT "massiv"
FOR i = 1 TO n
FOR j = 1 TO m
PRINT c(i, j); " ";
NEXT
PRINT
NEXT
FOR i = 1 TO n
max = c(i, 1)
nom = 1
FOR j = 1 TO m
IF c(i, j) > max THEN max = c(i, j): nom = j
NEXT
FOR k = 1 TO m
IF (k < nom) AND (c(i, k) < 0) THEN c(i, k) = c(i, k) / max
NEXT
NEXT
PRINT "novyj massiv"
FOR i = 1 TO n
FOR j = 1 TO m
PRINT c(i, j); " ";
NEXT
PRINT
NEXT