Program to convert Degree to Radian
Given the angle in degree, the task is to convert this into radians.
Input: degree = 45 Output: radian = 0.785398 Input: degree = 58 Output: radian = 1.01229
Attention reader! Don’t stop learning now. Get hold of all the important mathematical concepts for competitive programming with the Essential Maths for CP Course at a student-friendly price. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.
Radian: The Radian is the SI unit for measuring angles, used mainly in trigonometry. A radian is defined by an arc of a circle. A full circle is just over 6 radians (Roughly 6.28). One radian is just under 57.3 degrees.
Degree: A degree, usually denoted by ° (the degree symbol), is a measurement of a plane angle, defined so that a full rotation is 360 degrees. Because a full rotation equals 2*pi radians, one degree is equivalent to pi/180 radians.
The formula to convert radian to degree is:
radian = degree * (pi/180) where pi = 22/7
Below is the implementation of the above approach: