#include <iostream>
using namespace std;
const int MAX=100;
class Seqstack{
public:
int Gettop();
void Push(int x);
Seqstack();
private:
int top;
int data[MAX];
};
Seqstack::Seqstack(){
top=-1;
}
void Seqstack::Push(int x){
cout<<"enter a number:"<<endl;
cin>>x;
data[++top]=x;
cout<<top<<endl;
}
int Seqstack::Gettop(){
int x;
x=data[top];
cout<<x;
return 0;
}
void main()
{
Seqstack s;
s.Push(5);
s.Push(4);
s.Gettop();
} 
