Search:
Forum
General C++ Programming
i want to evaluate polynomial using link
i want to evaluate polynomial using linked list
Apr 25, 2015 at 5:39pm UTC
saad abbasi
(11)
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 UTC
saad abbasi
(11)
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 ....
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs