Minimum squares to cover a rectangle | PHP 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
< ? php function squares ( $ l , $ b , $ a ) { return ceil ( $ l / ( double ) $ a ) * ceil ( $ b / ( double ) $ a ) ; } $ l = 11 ; $ b = 23 ; $ a = 14 ; echo squares ( $ l , $ b , $ a ) ; ? >