Number of largest circles that can be inscribed in a rectangle | Function to count the number of largest circles in a rectangle ; If length exceeds breadth ; Swap to reduce length to smaller than breadth ; Return total count of circles inscribed ; Driver Code
function totalCircles ( L , B ) { if ( L > B ) { var temp = L ; L = B ; B = temp ; } return B / L ; } var L = 3 ; var B = 8 ; document . write ( totalCircles ( L , B ) . toString ( ) . split ( ' ' ) [ 0 ] ) ;