DIM a(10)
RANDOMIZE TIMER
PRINT "ishodnyj massiv"
FOR i=1 TO 10
a(i)=INT(RND*20)-10
PRINT a(i);
NEXT
PRINT
max=-1E+38
FOR i=1 TO 10
IF a(i)<0 AND a(i)>max THEN max=a(i)
NEXT
FOR i=1 TO 10
IF a(i)>0 THEN a(i)=max
NEXT
PRINT "novyj massiv"
FOR i=1 TO 10
PRINT a(i);
NEXT