Header file:
math.h
Synopsis:
double tan(double x);
Description:
Returns tangent value of x.
tan function in C example:
#include<stdio.h>
#include<math.h>
int main() {
/*
* degree to radian conversion
* radian = degree * PI/180;
*/
double deg, radian;
printf("Enter your input:");
scanf("%lf", °);
deg = deg * (3.14 / 180);
radian = tan(deg);
printf("Result: %lf\n", radian);
return 0;
}
#include<math.h>
int main() {
/*
* degree to radian conversion
* radian = degree * PI/180;
*/
double deg, radian;
printf("Enter your input:");
scanf("%lf", °);
deg = deg * (3.14 / 180);
radian = tan(deg);
printf("Result: %lf\n", radian);
return 0;
}
Output:
jp@jp-VirtualBox:~/cpgms/math$ gcc tan.c -lm
jp@jp-VirtualBox:~/cpgms/math$ ./a.out
Enter your input:45
Result: 0.999204
jp@jp-VirtualBox:~/cpgms/math$ ./a.out
Enter your input:45
Result: 0.999204
It has been simply incredibly generous with you to provide openly what exactly many individuals would’ve marketed for an eBook to end up making some cash for their end, primarily given that you could have tried it in the event you wanted.
ReplyDeleteData Science Interview Questions
Angular JS Interview Questions
Big Data Training in Velachery
AWS Certified Developer
Best Resource of Learning Devops
Blueprism Interview Questions
Automation Anywhere Interview Questions