Thursday, 16 November 2017

C Program to Find Area of Trapezium


Code:

#include  stdio.h

int main()
{
    float a, b, h;
    float area;

    printf("Enter the value for two bases & height of the trapezium: \n");
    scanf("%f%f%f", &a, &b, &h);
    area = 0.5 * (a + b) * h ;
    printf("Area of the trapezium is: %.3f", area);
    return 0;
}

Output:

Enter the value for two bases and height of the trapezium :
10 15 20
Area of the trapezium is: 250.000

More C Programs:












100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...