Answer to Question #323669 in C for osama

Question #323669

3x4sin(180x) + 4x3 cos(90x) + x2sin(tan(45)) + 7x + 9cos(90x2 )


1
Expert's answer
2022-04-07T13:13:48-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS