Length of the direct common tangent between two externally touching circles | C ++ program to find the length of the direct common tangent between two circles which externally touch each other ; Function to find the length of the direct common tangent ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; void lengtang ( double r1 , double r2 ) { cout << " The ▁ length ▁ of ▁ the ▁ " << " direct ▁ common ▁ tangent ▁ is ▁ " << 2 * sqrt ( r1 * r2 ) << endl ; } int main ( ) { double r1 = 5 , r2 = 9 ; lengtang ( r1 , r2 ) ; return 0 ; }