Ratio of the distance between the centers of the circles and the point of intersection of two transverse common tangents to the circles | C ++ program to find the ratio of the distance between the centres of the circles and the point of intersection of two transverse common tangents to the circles which do not touch each other ; Function to find the ratio ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int GCD ( int a , int b ) { return ( b != 0 ? GCD ( b , a % b ) : a ) ; } void ratiotang ( int r1 , int r2 ) { cout << " The ▁ ratio ▁ is ▁ " << r1 / GCD ( r1 , r2 ) << " : " << r2 / GCD ( r1 , r2 ) << endl ; } int main ( ) { int r1 = 4 , r2 = 8 ; ratiotang ( r1 , r2 ) ; return 0 ; }