/*To evaluate the value of y=sinx+cos3x*/
#include<math.h>
#include<stdio.h>
int main ()
{
float x, y;
printf("Enter the value of x in degree: ");
scanf("%f", &x);
/*multiplying x by 0.0174533 to convert it from degree to radian*/
y=sin(x*.0174533)+cos(3*x*.0174533);
printf("\n The required value of y is: %f\n",y);
return(0);
}
#include<math.h>
#include<stdio.h>
int main ()
{
float x, y;
printf("Enter the value of x in degree: ");
scanf("%f", &x);
/*multiplying x by 0.0174533 to convert it from degree to radian*/
y=sin(x*.0174533)+cos(3*x*.0174533);
printf("\n The required value of y is: %f\n",y);
return(0);
}
Comments
Post a Comment