rev='made'/> name='keywords'/> name='author'/> ANURANAN: UVa Problem Solution 10347 - Medians

Welcome Note

Hi,
I'm Anisuzzaman Babla . I am a full stack Android Application Developer. I am working with Android for more than two years. I have completed my graduation from IIT, Jahangirnagar University. I have developed a series of commercially successful apps on Android. Moreover, 10+ of my Apps are live at Google play store. .
Thank You

UVa Problem Solution 10347 - Medians

#include <stdio.h>
#include <math.h>
int main()
{
    double med1, med2, med3, med_s, area, a;
    for(a=0; a<1000; a++)
    {
        scanf("%lf %lf %lf", &med1, &med2, &med3);
        med_s=(med1+med2+med3)/2;
        area=(4.0/3.0)*(sqrt(med_s*(med_s-med1)*(med_s-med2)*(med_s-med3)));
        if(area>0)
            printf("%.3lf\n", area);
        else
        {   area=-1;
            printf("%.3lf\n", area);
        }
    }
}

No comments:

Post a Comment