• Source
    1. #include<stdio.h>
    2. #include<math.h>
    3. int main()
    4. {
    5. double r,s,a,b,c,d,e,f,g,h;
    6. while(scanf("%lf%lf%lf",&a,&b,&c)!=EOF)
    7. {
    8. if(a==0 || b==0 || c==0)
    9. {
    10. printf("The radius of the round table is: 0.000\n");
    11. }
    12. else
    13. {
    14. s=(a+b+c)/2;
    15. d=s-a;
    16. e=s-b;
    17. f=s-c;
    18. g=s*d*e*f;
    19. h=sqrt(g);
    20. r=h/s;
    21. printf("The radius of the round table is: %.3lf\n",r);
    22. }
    23. }
    24. return 0;
    25. }