Solving a Polynomial over a domain

Hey guys, first (of many) post here as I am taking a computational physics class with literally zero programming experience.
My first assignment is to take a polynomial: y = 12 x^5 + 4 x^4 - 2 x^3 + 8 x^2 -3 x + 7, and solve it on the domain of [1,10] in 1000 steps while measuring CPU time. (Then redoing it using Horner's Method, but I'm not worried about that now)
SO my question is, where do I even start? I assume I will need some type of loop for the interval, but I do not even know how to do that.
Any help you guys can give will be awesome.

Thanks
sorry, here is what I have so far..

#include <iostream>
#include <iomanip>

using namespace std;


int main()
{
cout << fixed << showpoint << setprecision(3);

double x = 0.000;
double x1, y1, y;
double counter = 0.000;



cout << "The polynomial we are evaluating is "
<< "Y = 12x^5 + 4x^4 - 2x^3 + 8x^2 -3x + 7" << endl;

cout << "The X and Y values of this function are: " << endl;
cout << endl << " X Y " << endl;

while (counter <= 10 ) {
y = 12*(x*x*x*x*x)+4*(x*x*x*x)-2*(x*x*x)+8*(x*x)-3*x+7;
x1 = x;
y1 = y;
cout << x1 << " " << y1 << endl;
x = x + .001;
counter = counter + .001;
}

system("PAUSE");

Perhaps I am being too unclear, I pretty mush now need to save the points and graph them. And somehow measure the CPU time
bump
> save the points
Either look at std::ofstream of just do output redirection
$ ./program.bin > output.txt #redirecting standard output (cout)

> graph them
Learn opengl, find a graph library or use a program
By instance gnuplot

> measure the CPU time
http://linux.die.net/man/1/time
Topic archived. No new replies allowed.