Skip to content

samarth015/math-expr-eval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mathematical Expression Evaluator

A rudimentary expression evaluator which I wrote for fun while I was learning about the applications of stacks. Implemented a simple command line calculator using it. It can also be used in a GUI calculator.

Example

#include <iostream>
#include "math_expr_eval.cpp"

int main(){

	evalexpr calc ;
	std::string expression = "18-[6-{4-(8-(6+3))}]";  
	auto result = calc.evaluate(expression);

	std::cout << "Result is --> " << result << std::endl;

}

Result is --> 17

About

Evaluates strings of mathematical expressions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages