C Program to Find Area of Trapezium

C Program to Find Area of Trapezium

#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;

    }

Share this post


Comments (0)

  • Be first to comment

Leave a comment

or to Comment

Contact Us

  • Address: # 650 Narsi Village Sector 32 Urban Estate Karnal-132001 Haryana, India

  • Phone:(+91) 97289-77666   Email: codethor84@gmail.com


Follow Us