3x4sin(180x) + 4x3 cos(90x) + x2sin(tan(45)) + 7x + 9cos(90x2 )
#include <stdio.h>
#include <math.h>
double fun(double x) {
double res = 3 * pow(x,4) * sin(180*x);
res += 4*x*x*x * cos(90*x);
res += x*x * sin(tan(45));
res += 7*x;
res += 9*cos(90*x*x);
return res;
}
int main() {
double x, y;
printf("Enter x: ");
scanf("%lf", &x);
y = fun(x);
printf("f(x) = %lf", y);
return 0;
}
Comments
Leave a comment