#include<stdio.h>

float Atriang(float, float);

float Arect(float, float);

float Atriang2(float, float);


int main()

{

    int l, b, h;



    float Total_Area;



    printf("Enter the length: \n");

    scanf("%d", &l);



    printf("Enter the breadth: \n");

    scanf("%d", &b);



    printf("Enter the height: \n");

    scanf("%d", &h);



    printf("The Area of two triangles is %f \n", Atriang(b , h));

    printf("The Area of Rectangle is %f \n", Arect(l, b));



    Total_Area = Atriang(b,h) + Arect(l, b) + Atriang2(b,h);

    printf("The Total Area is %f \n", Total_Area);



}


float Atriang(float x , float y)

{

    float z = 0.5 * x * y;

    return z;

}



float Arect(float x , float y)

{

    float o = x * y;

    return o;

}



float Atriang2(float x , float y)

{

    float v = 0.5 * x * y;

    return v;

}

Embed on website

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