Program to generate Trigonometric Table
Program:
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
float r;
int i;
char ch;
clrscr();
printf("- - - - - - - - - - - - - - - - - -");
printf("\nAngle \t Sin \t Cos \t Tan \n");
printf("- - - - - - - - - - - - - - - - - -");
for(i = 0 ; i <= 180 ; i = i + 30)
{
r = i * 3.14159 / 180;
printf("\n%3d \t %5.2f \t %5.2f \t %5.2f\n", i, sin(r), cos(r), tan(r));
}
printf("- - - - - - - - - - - - - - - - - -");
getch();
}
Output:
- - - - - - - - - - - - - - - - - -
Angle Sin Cos Tan
- - - - - - - - - - - - - - - - - -
0 0.00 1.00 0.00
30 0.50 0.87 0.58
60 0.87 0.50 1.73
90 1.00 0.00 788898.12
120 0.87 -0.50 -1.73
150 0.50 -0.87 -0.58
180 0.00 -1.00 -0.00
- - - - - - - - - - - - - - - - - -
-
UpdatedDec 30, 2019
-
Views14,624
You May Like
Program to maintain employee details using structures
Program to maintain student details using structures
Check whether the person is eligible to vote or not
Print the numbers that are divisible by a given no.
Program to generate magic square
To sort the given numbers in ascending & descending order