DIM a(6, 8)
RANDOMIZE TIMER
FOR i = 1 TO 6
FOR j = 1 TO 8
a(i, j) = INT(RND * 50) - 25
NEXT
NEXT
PRINT "ishodnyj massiv"
FOR i = 1 TO 6
FOR j = 1 TO 8
PRINT a(i, j);
NEXT
PRINT
NEXT
max = a(1, 1)
nmax = 1
FOR i = 1 TO 6
FOR j = 1 TO 8
IF a(i, j) > max THEN max = a(i, j): nmax = i
NEXT
NEXT
FOR j = 1 TO 8
IF a(nmax, j) > 0 THEN s = s + a(nmax, j)
NEXT
PRINT "summa="; s; "v stroke"; nmax