#include iostream.h>
#include stdio.h>
#include conio.h>
int getarray(int x[],int first)
  {
    int i;
    for(i=0;i    {
        printf("Enter element  %d : ",i+1);
        scanf("%d",&x[i]);
    }
    return (x[first]);
  }
int main()
 {
     
        int* x;
            int first,left=0,i,j,y;
        printf("Enter Size of aray : ");
        scanf("%d",&first);
        x=new int[first];
        getarray(x,first);
        for(i=1;i<=first-1;i++)
           {
             y=x[i];
             j=i-1;
             while(j>=0&&y             {
                      x[j+1]=x[j];
                 j=j-1;
             }
            x[j+1]=y;
           }
        for(int k=0;k < first ;k++)
             printf("%d   ,",x[k]);
        cout < < endl < < endl;
                getch();
            return 0;
 }