1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | input "vvedite kol-vo elementov ",n dim x(n) for i= 1 to n input"vvedite element ",x(i) next print"ishodnyj massiv" for i= 1 to n print x(i); next print for i= 1 to n if x(i)< 0 then x(i)= 0 next print"novyj massiv" for i= 1 to n print x(i); next |
Тестирование выполнено в программе QB64 ( Скачать )