Find maximum unreachable height using two ladders | Function to return the maximum height which can 't be reached ; Driver code
function maxHeight ( h1 , h2 ) { return ( ( h1 * h2 ) - h1 - h2 ) ; } var h1 = 7 , h2 = 5 ; document . write ( Math . max ( 0 , maxHeight ( h1 , h2 ) ) ) ;