#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#define MAX 5
void push();
void pop();
void display();
void exo();
int stack[MAX],i,top=-1,ch;
void main()
{
clrscr();
do
{
printf("\nEnter your choice");
printf("\n1. Push");
printf("\n2. Pop");
printf("\n3. Display");
printf("\n4. Exit ");
scanf("%d",&ch);
switch(ch)
{
case 1: push();
break;
case 2: pop();
break;
case 3: display();
break;
case 4: exo();
break;
default: printf("\nWrong Choice ");
break;
}
}while(ch!=4);
getch();
}
void push()
{
if(top==MAX-1)
{
printf("\nStack is full ");
}
else
{
top++;
printf("\nEnter the element ");
scanf("%d",&stack[top]);
}
}
void pop()
{
if(top==-1)
{
printf("\nStack is empty ");
}
else
{
printf("\nThe deleted element is %d",stack[top]);
}
top--;
}
void display()
{
if(top==-1)
{
printf("\nStack doesn't have any element in it ");
}
else
{
printf("\n The stack elements are:-");
for(i=top;i>=0;i--)
{
printf("\n%d",stack[i]);
}
}
}
void exo()
{
exit (0);
}
The best casino - jtmhub.com
ReplyDeleteFind all the 영주 출장샵 casinos 전라북도 출장샵 - 오산 출장마사지 JTG 충청북도 출장마사지 Hub 의왕 출장샵
review Wand Massagers,vibrating dildos,dildos,Discreet Vibrators,penis pumps,couples sexy toys,vibrators,Bullets And Eggs,realistic dildos i loved this
ReplyDelete