# Convert Radians to Degrees in C++

Radian and degree are two different units of measurement for angles. Radians measure the angle in terms of the arc length on a circle, while degree measures it as `360/2π`

.

Radians are more convenient when working with small angles since they appear as a fraction of `π`

. Degrees, on the other hand, are easier to use when dealing with large angles.

In this article, we will discuss the conversion of radians into degrees in C++.

## Convert Radians to Degrees in C++

The radians to degrees conversion is a very simple calculation. Firstly, we find the value of radians using the following formula.

```
Radian = atan(y/x)
```

The `atan()`

function takes two arguments, `y`

and `x`

, which represent the coordinates of a point on a unit circle, with `x`

being the length along its horizontal axis and `y`

being its vertical axis.

After finding the value of radian, we will put the value of radian in the following formula:

```
degrees = radians (180.0/3.14)
```

The degrees variable is assigned the value of the radians variable multiplied by 180 divided by pi (3.14).

Let’s discuss an example of converting radians into degrees using the abovementioned steps.

```
#include <iostream>
#define pi 3.14
#include<cstdlib>
#include<cmath>
using namespace std;
float Convert(float radian)
{
return(radian * (180 / pi));
}
int main()
{
float radian = 78;
float degree = Convert(radian);
cout <<"The value of degree is " << degree;
return 0;
}
```

Click here to check the working of the code as mentioned above.