#include <stdio.h>
int stack[100];
int top = -1;
void push(int x){
stack[++top] = x;
}
int pop(){
return stack[top--];
}
int main(){
push(1);
push(2);
push(3);
push(4);
for (int i = 0;i < 4;i++) {
printf("%d\n",pop());
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: