#include<iostream>using namespace std;main(){ int i,num1,pos,n; int *p=new int[10]; cout<<"Enter Size Of Array:"; cin>>n; cout<<"Enter NumberS:"; for(i=0;i<n;i++) cin>>p[i]; cout<<"Number To be Added:"; cin>>num1; cout<<"Address-:"; cin>>pos; for(i=n;i>=pos;i--) p[i+1]=p[i]; p[pos]=num1; for(i=0;i<n+1;i++) cout<<p[i]; }
No comments:
Post a Comment