Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #define PI 3.141592653589793
- int main(void)
- {
- double a = 0.0, b = 0.0;
- scanf("%lf %lf", &a, &b);
- double s60 = sin(PI/3);
- double c60 = cos(PI/3);
- double r = 0;
- r = ((2*a+b)*sqrt( (a*a+ (a+b)*(a+b) - 2*a*(a+b)*c60)*( (b*b+ (a+b)*(a+b) - 2*b*(a+b)*c60) ) )) / (2 * (2*a+b)*b*s60);
- printf("%.8lf", r);
- fflush(stdin);
- getc(stdin);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement