tan() function in C by R4R Team

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

Syntax-
tan(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= tan(ang*val);
printf("tan(%d) is %f",ang,ans);
return(0);
}


output-

Enter angle
45
tan(45) is 1.000000




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!