lol you could do that in a nice for loop would be better then a while as you are using while in the wrong instance i think anyways.
#include <iostream>
#include <stdlib.h>
using namespace std;
int main (void)
{
// f(x)=x^2-8x+15
for (int x = 0; x < 11;x++)
{
int val = ((x*x)-(8*x))+15;
cout << "F(" << x << ") = (" << x << " ^ 2) - (8 * " << x << ") + 15 = " << val << endl;
}
system("PAUSE");
return 0;
}
i was always taught that you use while loops when you dont no a definate result to end the loop
eg. while (start != end){
do something
}