Originally Posted by
MK27
No, he does not say that at all, except once hesitantly. In fact, what he does say quite clearly several times is that he needs to "write an algorithm for simpson's 1/3 rule" -- which would be a particular equation.
That does not requiring parsing.
Simpson's rule is most emphatically NOT a particular equation. It is an algorithm that takes a function as input -- hence the "I need to input a function" requirement -- and outputs an estimate of the integral of that function over a region. (The prototype would generally be something like
Code:
double simpson(double f(double), double start, double end, double tolerance);
although if you're feeling lucky you can make those floats.)
Now, when I assign this program, I make the students write some functions to integrate as sample (and of course I have mine that I use to test), so perhaps those auxiliary functions are all that is needed. But functions must be provided, one way or another.