#include "stdio.h"
#include "conio.h"
void main ()
{
int LA[10],i,j,n,m;
clrscr ();
printf("Enter the no. of elements in stack : ");
scanf("%d",&m);
for (i=1;i<=m;i++)
{
printf ("\nEnter the number: ");
scanf ("%d",&LA[i]);
}
printf ("\n\nEnter the location to be deleted: ");
scanf ("%d",&n);
n=n;
for (j=n;j<=m;j++)
{
LA[j]=LA[j+1];
}
printf("\n\n After deleting, the elements in stack are \n");
for (i=1;i
{
printf ("%d\n",LA[i]);
}
getch ();
}
0 comments:
Post a Comment