![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/bCGkDc/btqC9xtBNTu/Dk3F6y2J4NwcKd6xVWzJw0/img.jpg)
#include #include #define SZ 100 int stack[SZ]; int top = -1; int isEmpty() { return (top == -1); } int isFull() { return (top == (SZ - 1)); } int pop() { if (isEmpty() == 1) { return -999; } int temp; temp = stack[top--]; return temp; } void push(int n) { int if100 = 0; int popped = 0; if (isFull() == 1) { return; } if (n == 100) { while (isEmpty() == 0) { popped = pop(); if100 = if100 + popped..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/Jx5d6/btqDbkz3EVE/kelJn0vkyDvr03hX8ICL8k/img.jpg)
#include #include #define SZ 5 int stack[SZ]; int top = -1; int isEmpty() { return (top == -1); } int isFull() { return (top == (SZ - 1)); } void push(int n) { if (isFull() == 1) { return; } stack[++top] = n; return; } int pop() { if (isEmpty() == 1) { return -999; } int temp; temp = stack[top--]; return temp; } int main(void) { int n, data; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("..