Find the volume of rectangular right wedge | CPP program to find volume of rectangular right wedge ; function to return volume of rectangular right wedge ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; double volumeRec ( double a , double b , double e , double h ) { return ( ( ( b * h ) / 6 ) * ( 2 * a + e ) ) ; } int main ( ) { double a = 2 ; double b = 5 ; double e = 5 ; double h = 6 ; printf ( " Volume ▁ = ▁ % .1f " , volumeRec ( a , b , e , h ) ) ; return 0 ; }