C Program To Convert Radian To Degree

Lets write a C program to convert angle from Radian to Degree.

Formula To Convert Radian To Degree

degree = radian x (180.0 / M_PI);

where M_PI is a constant present in header file / library file math.h and its approximately equal to 3.14;

Related Read:
Keywords, Constants, Variables: C
Basic Arithmetic Operations In C
Print All Trigonometric Ratios: C Program
C Program To Convert Degree To Radian

Video Tutorial: C Program To Convert Radian To Degree



YouTube Link: https://www.youtube.com/watch?v=U9y2bnDY4kE [Watch the Video In Full Screen.]

Source Code: C Program To Convert Radian To Degree

  1. #include<stdio.h>  
  2. #include<math.h>  
  3.   
  4. int main()  
  5. {  
  6.     float radian, degree;  
  7.   
  8.     printf("Enter angle in Radian\n");  
  9.     scanf("%f", &radian);  
  10.   
  11.     degree = radian * ( 180.0 / M_PI );  
  12.   
  13.     printf("Angle in Degree is %f\n", degree);  
  14.   
  15.     return 0;  
  16. }  

Output 1:
Enter angle in Radian
1
Angle in Degree is 57.295780

Output 2:
Enter angle in Radian
5
Angle in Degree is 286.478912

For list of all c programming interviews / viva question and answers visit: C Programming Interview / Viva Q&A List

For full C programming language free video tutorial list visit:C Programming: Beginner To Advance To Expert