/* Program: sine.c Tests using the sine function from the math library. */ #include #include "genlib.h" #include "simpio.h" /* This line is needed to use the funcitons in the standard math library */ #include #define PI 3.14159 main() { double angle, radians ; printf("Enter angle in degrees: ") ; angle = GetReal() ; /* Convert angle to radians */ radians = angle * PI / 180.0 ; printf("The sine of %f degrees is %f.\n", angle, sin(radians)) ; }