This commit is contained in:
2023-10-06 13:58:30 +01:00
parent 317d7f837e
commit 4b798bfc66
2 changed files with 55 additions and 0 deletions

19
C10/ex2.c Normal file
View File

@@ -0,0 +1,19 @@
#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;
}