Write a program that evaluates the following expression at g

Write a program that evaluates the following expression at given x, y and z values. f(x, y, z) = x + Squareroot e^x^0.2 + (x^2 + y^3)/sin((x/(z * 10.5) + z^5.5

Solution

//The program is given below in c
#include<stdio.h>
#include<math.h> //used for math function

int main(void)
{
    double x,y,z,f;
    //variable initialization
    x=2;
    y=1;
    z=3;
//in statement below sqrt() used for square root, exp used for \'e\', pow is used for power.
    f=(x+sqrt(exp(pow(x,0.2))+(pow(x,2)+pow(y,3))))/(sin(x/(z*10.5))+pow(z,5.5));
     printf(\"value of f(x,y,z)=%lf\",f);
    return 0;
}

/* output

value of f(x,y,z)=0.011535

*/

 Write a program that evaluates the following expression at given x, y and z values. f(x, y, z) = x + Squareroot e^x^0.2 + (x^2 + y^3)/sin((x/(z * 10.5) + z^5.5

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site