Minimum squares to cover a rectangle | javascript program to find the minimum number of squares to cover the surface of the rectangle with given dimensions ; function to count the number of squares that can cover the surface of the rectangle ; Driver code
function squares ( l , b , a ) { return parseInt ( Math . ceil ( l / a ) * Math . ceil ( b / a ) ) ; } var l = 11 , b = 23 , a = 14 ; document . write ( squares ( l , b , a ) ) ;