Program: 66
Write a program to receive value of an angle in degrees and check whether sum of squares of sine and cosine of this angle is equal to 1.
#include<stdio.h> #include<conio.h> #include<math.h> int main() { int degree, result; printf("Enter the degree of angle: "); scanf("%d", °ree); result = (sin(degree)*sin(degree) + cos(degree)*cos(degree)); printf("Result is: %d", result); return 0; }
Output:
Enter the degree of angle: 45
Result is: 1
Β
Leave a Comment