Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  jitu
Language: C/C++
Code:
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
void main()

float arrayOfCoefficient[100],sumOfPolynomial=0,XValue; 
int n,i; 
clrscr(); 
printf("Highest degree of a polynomial's to solve the value:"); 
scanf("%d",&n); 
printf("Each coefficients of polynomial one by one:"); 
for(i=n;i>=0;i--) 
{
scanf("%f",&arrayOfCoefficient[i]);

printf("Enter the value of xValue of polynomail :"); 
scanf("%f",&xValue); 
for(i=n;i>0;i--) 
{
sumOfPolynomial=(sumOfPolynomial+arrayOfCoefficient[i])*xValue;

sumOfPolynomial=sumOfPolynomial+arrayOfCoefficient[0]; 
printf("nEvaluted Value of hole expression is =%f",sumOfPolynomial); 
getch();
}
          
          
Comments: