Question: Write a program in C that gets a function from the user as string and calculates the value of the function for a value entered

Write a program in C that gets a function from the user as string and calculates the value of the function for a value entered by user. Program must be able to calculate combinations of polynomial, exponential, trigonometric, logarithmic, inverse trigonometric.
For example:
-input string from the user: sin(x*e^(5x)) means sine (x times e to the 5x)
-input string from the user: x^(sin(log_5(x3)) means x to the sine (log base 5 x to the 3)
-input string from the user: log_x(sin(5x^2+ sin5x)) means logarithm base x (sine (5x to the 2+ sin5x)
^ can be used as the exponent operator and _ as the base operator.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!