#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..
#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("..