20 lines
299 B
C
20 lines
299 B
C
|
#include <stdio.h>
|
||
|
#include <math.h>
|
||
|
|
||
|
|
||
|
float degrees_to_radians(float degrees) {
|
||
|
return M_PI * degrees / 180.0;
|
||
|
}
|
||
|
|
||
|
int main() {
|
||
|
float input, output;
|
||
|
printf("Enter an angle in degrees: ");
|
||
|
scanf("%f", &input);
|
||
|
|
||
|
output = degrees_to_radians(input);
|
||
|
|
||
|
printf("%f radians\n", output);
|
||
|
|
||
|
return 0;
|
||
|
}
|