Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 941 Bytes

README.md

File metadata and controls

43 lines (25 loc) · 941 Bytes

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