// stack and its basic operation
// Main operation
// 1=push; 2=pop; 3=peek
#include<iostream>
using namespace std;
class stack
{
int high,x;
public:
int z[5];// its maximum value
// here we assign constructor
stack()
{
high==0;
}
// we define basic operation that are perfome
void push(int x);
void pop();
void blank();
};
void stack::push(int x)
{
if(high==0)
{
cout<<"::its Already Empty::"<<endl;
}
else
{
z[++high]==x;
cout<<"::value inserted::"<<endl;
}
}
void stack::pop()
{
if(high==0)
{
cout<<"::its Empty::"<<endl;
}
else
{
int y=z[--high];
cout<<"::Value deleted::"<<endl;
}
}
void stack::blank()
{
if(high==0)
{
cout<<"::its Empty::"<<endl;
}
else
{
cout<<"Element Not inserted::"<<endl;
}
}
int main()
{
stack Aseem;
[Link](5);
[Link]();
[Link]();
}