Percentage increase in the volume of cuboid if length , breadth and height are increased by fixed percentages | C ++ implementation of the approach ; Function to return the percentage increase in the volume of the cuboid ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; double increaseInVol ( double l , double b , double h ) { double percentInc = ( 1 + ( l / 100 ) ) * ( 1 + ( b / 100 ) ) * ( 1 + ( h / 100 ) ) ; percentInc -= 1 ; percentInc *= 100 ; return percentInc ; } int main ( ) { double l = 50 , b = 20 , h = 10 ; cout << increaseInVol ( l , b , h ) << " % " ; return 0 ; }