Number of largest circles that can be inscribed in a rectangle | C ++ program for the above approach ; 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
#include <bits/stdc++.h> NEW_LINE using namespace std ; int totalCircles ( int L , int B ) { if ( L > B ) { int temp = L ; L = B ; B = temp ; } return B / L ; } int main ( ) { int L = 3 ; int B = 8 ; cout << totalCircles ( L , B ) ; return 0 ; }