Files
ee/ee.h

37 lines
631 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;
STACK push(double,STACK);
STACK 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();