c program to find area of triangle





C program to find area of triangle

C program to calculate area of triangle



#include<stdio.h>
#include<math.h>
int main(){
    double a,b,c,s;
    double area;
    scanf("%lf%lf%lf",&a,&b,&c);
    s = (a + b + c)/2;
    area =sqrt (s*(s-a)*(s-b)*(s-c));
    printf("%lf",area);
    return 0;
}




No comments: