#include <cstdlib>
#include <iostream>
using namespace std;
class Stack{
public:
Stack(){
jum = 5;
last = 0;
}
void push(int data){
if(jum > last){
a[last] = data;
last = last + 1;
}
}
int pop(){
if(last > 0){
int temp = a[last - 1];
a[last - 1] = 0;
last = last – 1;
return temp;
}
#include <iostream>
using namespace std;
class Stack{
public:
Stack(){
jum = 5;
last = 0;
}
void push(int data){
if(jum > last){
a[last] = data;
last = last + 1;
}
}
int pop(){
if(last > 0){
int temp = a[last - 1];
a[last - 1] = 0;
last = last – 1;
return temp;
}