/* June 2, 1998 */ /* Program to determine the length of one side of a triangle given values for b, c, and alpha */ #include #include #define PI 3.14159 /* Define PI */ main () { /* declaration */ double a, b, c, alpha; /* Enter values */ printf("Enter value of b> "); scanf("%lf", &b); printf("Enter value of c> "); scanf("%lf", &c); printf("Enter value of alpha> "); scanf("%lf", &alpha); /* Calculation */ a =sqrt(pow(b,2)+ pow(c,2) - 2 * b * c * cos(alpha * PI /180.0)); /* Display values */ printf("The value of a is %.2f \n", a); }