Ad Code

Responsive Advertisement

1043 - Triangle

Author: Ismail Hosen

Daffodil International University





Problem Link

//Please follow from main function

#include<stdio.h>

int main()

{

    double a, b, c, t;

    scanf("%lf %lf %lf", &a, &b, &c);

    t=((a+b)/2)*c;

    if((a+b)>c && (b+c)>a && (a+c)>b)

    {

        printf("Perimetro = %.1lf\n", a+b+c);

    }

    else

    {

        printf("Area = %.1lf\n", t);

    }

    return 0;



}




Post a Comment

0 Comments