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

int main() {
    float a,b,c,s,S;
    printf("Introduce la longitud del lado a:\n");
    scanf("%f",&a);
    
    printf("Introduce la longitud del lado b:\n");
    scanf("%f",&b);
    
    printf("Introduce la longitud del lado c:\n");
    scanf("%f",&c);
    
    s=(a+b+c)/2.0;
    S=sqrtf(s*(s-a)*(s-b)*(s-c));
    
    printf("El área del triángulo es:%f",S);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: