# Answer to Question #52785 in C for Prabhakaar

Question #52785

Write a function that computes the value of the polynomial 3x5 . Write a program that asks the user to enter a value for , calls the function to compute the value of the polynomial, and display the value returned by the function.

Expert's answer

#include <stdio.h>

#include <math.h>

using namespace std;

float f(float x)

{

return3*pow(x,5);

}

int main(){

float x;

printf("Input x: ");

scanf("%f",&x);

printf("The value of f(x)=3*x^5=%.2f",f(x));

return 0;

}

#include <math.h>

using namespace std;

float f(float x)

{

return3*pow(x,5);

}

int main(){

float x;

printf("Input x: ");

scanf("%f",&x);

printf("The value of f(x)=3*x^5=%.2f",f(x));

return 0;

}

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment