following equation 3x4 + 4x3 + x2 + 7x + 9, substitute the user provided value of x and generate the result.
#include <stdio.h>
#include <math.h>
int main()
{
printf("Enter the value of x: ");
int x;
scanf("%d",&x);
int result=(3*(pow(x,4)) + (4*(pow(x,3))) + (pow(x,2)) + (7*x) + 9);
printf("\nResult = %d",result);
return 0;
}
Comments
Leave a comment