a) Implement the following equation
x4 sin(45x) + x3 cos(25 x) + x2 tan(30 x) + 12x-1 + cos(108 x2 )
Where value of x will be 5.
#include <stdio.h>
#include <math.h>
int main()
{
int x = 5;
double result;
result = pow(x, 4) * sin(45 * x) + pow(x, 3) * cos(25 * x) +
pow(x, 2) * tan(30 * x) + 12 * pow(x, -1) + cos(108 * pow(x, 2));
printf("%f\n", result);
return 0;
}
Comments
Leave a comment