Click here to Skip to main content
15,915,501 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,
I want make a calculator in which people calculates in this way;

for example one can write in textbox like this : 3+6/8*(9+6-9+8*(8+25))

Which ways should i follow while doing this?
There are lots of things to be taken into account;
Split () caracters, operator precedence etc.
If you have a project code like this could you share me?
Thanks in advance.
Posted

1 solution

To calculate the value calculation given in the form of a string as specified in the question the expression has to be evaluated. In this regard the following Code Project articles
An expression evaluator written in VB.NET[^]
math / function / boolean /string expression evaluator[^]
may be helpful.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900