Hello , i have a task from the university , i have to make a calculator in c++ which calculate the analitic derivative of a function ( i have solved this point) , and after this task is completed complete another task which is the following.
The user input a function from the keyboard.
I store it in an array of chars, and lets say the user enters this function : f(x) = x^3*5+5
I have to calculate the value of that function in a point , for example if x=5 my function should return the value of f(5) , the problem is that i dont know how to pass the function f(x) from an array of chars to an array of integers in order to be able to actually compute the result. What i tought its that i take every operation and make an if for everyone , lets say i take a for loop and if i find the simbol function[i]= '*' the program must calculate the multiplication of the function[i-1] * function[i+1] , but this thing gets TOO much time ,and i really think there must be another way of doing it. How can i pass the function ??
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment