text: Program to find area of a Trapezoid | C ++ program to calculate area of a trapezoid ; Function for the area ; Driver Code
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; double Area ( int b1 , int b2 , int h ) { return ( ( b1 + b2 ) / 2 ) * h ; } int main ( ) { int base1 = 8 , base2 = 10 , height = 6 ; double area = Area ( base1 , base2 , height ) ; cout << " Area ▁ is : ▁ " << area ; return 0 ; }