Tux Education Our New Education Channel Please Share And Subscribe It...

/* Find Area Of Any Triangle */



// Compiler : Dev-C++ 4.9.9.2

#include<stdio.h>
#include<math.h>

int main()
{
    float a,b,c;
    float s,area;

    printf("Side A : ");
    scanf("%f",&a);
    printf("\n\nSide B : ");
    scanf("%f",&b);
    printf("\n\nSide C : ");
    scanf("%f",&c);

    s = (a+b+c)/2;
    area = sqrt(s*(s-a)*(s-b)*(s-c));

    printf("\n\n\nArea Of Triangle Is: %.3f",area);
    
    getch();
    return 0;
}

Post a Comment