Rectangle with minimum possible difference between the length and the width | Function to print the length ( l ) and breadth ( b ) of the rectangle having area = N and | l - b | as minimum as possible ; Driver code
function find_rectangle ( are ) { for ( let i = Math . floor ( Math . ceil ( Math . sqrt ( area ) ) ) ; i <= area ; i ++ ) { if ( Math . floor ( area / i ) * i == area ) { document . write ( i + " " + Math . floor ( area / i ) ) ; return ; } } } let area = 99 ; find_rectangle ( area ) ;