Skip to content

Instantly share code, notes, and snippets.

@rizwansoaib
Created January 5, 2018 11:52
Show Gist options
  • Save rizwansoaib/c559eea7ad0e4d2ce1b68f5b1fa269a8 to your computer and use it in GitHub Desktop.
Save rizwansoaib/c559eea7ad0e4d2ce1b68f5b1fa269a8 to your computer and use it in GitHub Desktop.
To find all trignometric ratio
#include <stdio.h>
void main()
{
double x;
scanf("%lf",&x);
double b=x*3.14/180;
printf("sin %.lf°=%.lf",x,sin(b));
printf("\ncos %.lf°=%.lf",x,cos(b));
printf("\ntan %.lf°=%.lf",x,tan(b));
printf("\ncosec %.lf°=%.lf",x,1/sin(b));
printf("\nsec %.lf°=%.lf",x,1/cos(b));
printf("\ncot %.lf°=%.lf",x,cos(b)/sin(b));
}
@rizwansoaib
Copy link
Author

To find all trignometric ratio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment