Apr 25, 2015 at 5:39pm Apr 25, 2015 at 5:39pm UTC
int polynomial:: evaluate_polynomial()
{
int input=0;
temp = NULL;
newnode = NULL;
//int newcoeff=0, newexpo = 0;
int evaluation_result = 0;
temp = head;
cout << "Enter value of X : " ;
cin >> input;
while (temp != NULL)
{
evaluation_result = evaluation_result + pow((coeff*input), expo);
//evaluation_result = (evaluation_result) + (temp->coeff) * (pow(input, expo));
temp = temp->next;
}
return evaluation_result;
}
Apr 25, 2015 at 5:40pm Apr 25, 2015 at 5:40pm UTC
in while statement there are two formula that click in my mind but both of them are not working correctly .... please help me to make formula for evaluation ....