Files
ee/ee.h
2018-10-16 20:58:34 -05:00

37 lines
638 B
C

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <string.h>
const int ERR_NS_OPERANDS = 1;
const int ERR_NS_OPERATORS = 2;
const int ERR_INVALID_INPUT = 4;
const int ERR_INVALID_FACTORIAL = 8;
struct EE_STACK_NODE {
double datum;
struct EE_STACK_NODE* tail;
};
typedef struct EE_STACK_NODE NODE;
typedef struct EE_STACK_NODE* STACK;
void push(double,STACK*);
void pop(STACK*);
double peek(STACK*);
int isNum(const char*);
int arrity(const char);
double evaluate(STACK*, char);
double* operands(STACK*, int);
double fact(int n);
void report(STACK*);