Solving a Variable Equation defined by the User
问题 Answers in C, Python, C++ or Javascript would be very much appreciated. I've read a few books, done all the examples. Now I'd like to write a simple program. But, I already ran into the following roadblock: My intention is to take an equation from the user and save it in a variable, For example: -3*X+4 or pow(2,(sin(cos(x))/5)) > [In valid C Math syntax] And then calculate the given expression for a certain X-Value. Something like this: printf("%g", UserFunction(3.2)) // Input 3.2 for X in