INPUT "vvedite kol-vo elementov ", n
DIM y(n)
RANDOMIZE TIMER
PRINT "ishodnyj massiv"
FOR i = 1 TO n
y(i) = INT(RND * 10 + 1)
PRINT y(i); " ";
NEXT
PRINT
max = y(1)
FOR i = 2 TO n
IF y(i) > max THEN max = y(i)
NEXT
FOR i = 1 TO n
IF y(i) = max THEN y(i) = 0
NEXT
PRINT "novyj massiv"
FOR i = 1 TO n
PRINT y(i); " ";
NEXT
Тестирование выполнено в программе QB64 ( Скачать )