#include<stdio.h>
#include<conio.h>
void main()
{
int stack[10]={1,2,3,4,5};
int i,n,item,top=4;
do
{
if(top<0)
{
printf("Underflow");
getch();
break;
}
else
{
top=top-1;
printf("\n\nStack elements are");
for(i=top;i>=0;i--)
{
printf("\n%d",stack[i]);
}
}
printf("\n\nDo you want to delete more elements from stack(1 for yes 2 for no)");
scanf("%d",&n);
}
while(n==1);
}