Find maximum unreachable height using two ladders | C # implementation of the approach ; Function to return the maximum height which can 't be reached ; Driver code
using System ; class GFG { static int maxHeight ( int h1 , int h2 ) { return ( ( h1 * h2 ) - h1 - h2 ) ; } public static void Main ( ) { int h1 = 7 , h2 = 5 ; Console . WriteLine ( Math . Max ( 0 , maxHeight ( h1 , h2 ) ) ) ; } }