//Dev-C++ (C)
#include
#define n 5
int main(void)
{int Array[n],NewEle,point,boo;
point=-1;
boo=1;
for(int i=0;i {scanf("%d",&Array[i]);
if((Array[i]<0)&&(boo)){<br> point=i;
boo=0;}
}
if(point==-1) printf("No negative elements");
else
{scanf("%d",&NewEle);
for(int i=n-2;i>=point;i--)
Array[i+1]=Array[i];
Array[point]=NewEle;
for(int i=0;i printf("%d ",Array[i]);}
return 0;}
Пример ввода:
1
-2
3
4
5
Пример вывода:
1 5 -2 3 4