sin() function in C by R4R Team

-sin() is a function that are able to find the value of the sine(trigonometry function).
-It is predefined in math.h header file.

Syntax-
sin(angle)

program-

#include < stdio.h>
#include < math.h>
int main () {
double ans,val;
int ang;
printf("Enter angle\n");
scanf("%d",&ang);
val = 3.14159265/180;
ans= sin(ang*val);
printf("Sin(%d) is %f",ang,ans);
return(0);
}


output-

Enter angle
90
sin(90) is 0.000000

Enter angle
30
sin(30) is 0.500000




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!