14 lines
359 B
C
14 lines
359 B
C
#ifndef CALCULATOR_H
|
|
#define CALCULATOR_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
double evaluate_expression(const char *expression, bool *error);
|
|
bool is_operator(char c);
|
|
int get_priority(char op);
|
|
bool is_function(const char *str, int *length);
|
|
double apply_operator(double a, double b, char op);
|
|
double apply_function(const char *func, double value, bool *error);
|
|
|
|
#endif
|