#include <stdio.h> #define STACK_SIZE 100 int stack[STACK_SIZE]; int stack_size = 0; int pop() { if (stack_size <= 0) return 0; return stack[--stack_size]; } int push(int a) { stack[stack_size++] = a; } int calc(char *s) { int a, b, type; while (*s</stdio.h>…