top of page

Write a Program to convert degree into radian using C++

What is Radian?

The radian is the unit of angle in the International System of Units and is the standard unit of angular measure used in many areas of mathematics.

Radian Uses
  • Angles are most or generally measured in radians in calculus and most other branches of mathematics.

  • Radians are widely used in physics also. They are preferred over degrees when angular measurements are done in physics.


Convert Degree into Radian using C++


Formula:

radian = degree x (M_PI / 180.0);

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


Code:

#include<stdio.h>  
#include<math.h>  
  
int main()  
{  
    float degree, radian;  
  
    printf("Enter angle in Degrees\n");  
    scanf("%f", &degree);  
  
    radian = degree * ( M_PI / 180.0 );  
  
    printf("Angle in Radian is %f\n", radian);  
  
    return 0;  
}

Output:



The Tech Platform

0 comments
bottom of page