Skip to content

This is a C++ program that evaluates mathematical expressions containing operators +, -, *, and /, and parentheses ( and ). The program supports multi-digit numbers and guarantees that parentheses are used for each operator.

License

Notifications You must be signed in to change notification settings

BaseMax/MathematicalExpressionEvaluator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Mathematical Expression Evaluator

This is a C++ program that evaluates mathematical expressions containing operators +, -, *, and /, and parentheses ( and ). The program supports multi-digit numbers and guarantees that parentheses are used for each operator.

Usage

Clone the repository or download the source code files:

git clone https://github.com/BaseMax/MathematicalExpressionEvaluator

Compile the source code using a C++ compiler:

g++ main.cpp -o math_expression_evaluator

Run the program:

./math_expression_evaluator

Enter a mathematical expression without spaces and press Enter. The program will evaluate the expression and display the result.

Examples

Expression: (5+((8+2)*2))

Result: 25


Expression: ((6*(2+1))*(3+(3+1)))

Result: 126

License

This project is licensed under the GPL-3.0 License.

Copyright 2023, Max Base

About

This is a C++ program that evaluates mathematical expressions containing operators +, -, *, and /, and parentheses ( and ). The program supports multi-digit numbers and guarantees that parentheses are used for each operator.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages