C - Write program to convert from radians to degrees

Requirements

Write a program that converts from radians to degrees.

Hint

One radian equals 57.2957795 degrees, and one degree equals 0.01745329 radians.

Demo

#include <stdio.h>

int main()//from  w  ww .j  a v a 2 s .c om
{
    float degrees,radians;

    printf("Enter an angle in radians: ");
    scanf("%f",&radians);
    degrees = 57.2957795*radians;
    printf("%.2f radians is %.2f degrees.\n",radians,degrees);
    return(0);
}

Result

Related Exercise