hm... maybe store the equation as an array, use regular expressions to parse the degrees and coefficients, store each as a variable and use mathamatical operators to do the work
or if its a simple equation like that u could use a loop, but that wouldnt work that well with irrational equations or more complex ones
im interested in hearing some other ideas
|