+ 1
C++ programming doubt
How to make a c++ program that solves any linear equation in one variable . For example if I input x=42*x -76+7 ,it should be able to answer. Please Help!!
2 Answers
+ 3
you need to read the whole string then read each character. then depending on what character it is you do something
0
TargetIIT,
you could either go by the brute force approach, and just try numbers until you reach a solution, but that is neither efficient nor smart.
But in order to solve this question, you need to know what kind of equations you are dealing with. That way, you know what the syntax of the equation will be and then you can formulate a solution that involves parsing the input and breaking it up.