#include<stdio.h>
#define SIZE 5
int stack[SIZE],top=-1,i;
void push(int x){
    if(top==SIZE-1){
        printf("stack overflow\n");
    }
    else{
        stack[++top]=x;
    }
}
void pop(){
        if(top==-1){
            printf("stack overflow\n");
        }
        else{
            printf("popped:%d\n",stack[top--]);
        }
        void display(){
            if(top==1){
                printf("Stack is empty\n");
            }
            else{
                printf("stack:");
                for(int i=top;i<=0;i++){
                    printf("%d",x,stack[i]);
                    printf("\n");
                }
            }
        }
}
int main(){
    push(10);
    push(20);
    push(30);
    printf("%d",stack[i]);
    return 0;
}