Write a program that deletes any number from an array.

#include<stdio.h>
#include<conio.h>
#include<iostream.h>

void main()
{
    int n,a[100];
    clrscr();
    cout<<"How many numbers, you input in array : ";
    cin>>n;

    for(int i=0;i<n;i++)
    {
       cout<<"\na["<<i+1<<"] = ";
       cin>>a[i];
    }
   
    int p;
    cout<<"\nEnter any position to delete : ";
    cin>>p;
    if(p<0 || p>n)
       cout<<"\nDelete is not possible, please give value greater than 0 & less than "<<n;
    else
    {
       p=p-1;
       for(i=p+1;i<n;i++)
       a[i-1]=a[i];
       n--;
    }
   
    cout<<"\nAfter delete, Array contains : ";
    for(i=0;i<n;i++)
       cout<<"\n\na["<<i+1<<"] = "<<a[i];

    getch();
}

///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........