#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define MAX_SIZE 100
int stack[MAX_SIZE];
int top=-1;
void push(int x)
{
    if(top==MAX_SIZE-1)
    {
        
    }
    stack[++top]=x;
}
int pop()
{
    if(top==-1)
    {
        printf("Stack underflow\n");
    }
    top--;
}
void peek()
{
    if(top==-1)
    {
        printf("Stack underflow\n");
    }
    printf("%d\n",stack[top]);
}
void display()
{
    for(int i=0;i<=top;i++)
    {
        printf("%d ",stack[i]);
    }
    printf("\n");
}