C Program to Find Area of Trapezium

This C Program to Find Area of Trapezium page providing implementation program that finds Area of Trapezium using C language syntax.

Formula : Area = (1/2) * (a + b) * h
Where ‘a’ and ‘b’ are the 2 bases of trapezium
‘h’ is the height.

#include <stdio.h>
void main()
float a, b, h;
float area;
printf(“Enter the value of bases : “);
scanf(“%f%f”, &a, &b);
printf(“Enter Height : “);
scanf(“%f”, &h);
area = 0.5 * (a + b) * h ;
printf(“Area of trapezium is: %.3f”, area);

Share this