mathematically phrase input in console

Hi
I want to give the console a mathematically phrase like this:
(3*x^2+7-2/x^6)/3^x
and then input a number and it the program can give me the answer
and also if the phrase was wrong, the program finds out for example this is wrong:
(3*x^2+7-2/x^6/3^x
because the parantheses !
tnx
It's a problem of parsing. It's not really hard. You have to read the string into a tree structure. For example, 2*x+5 could become
   +
  / \
 *   5
/ \
2 x

good luck.
Topic archived. No new replies allowed.