Find two co | C ++ implementation of the approach ; Function to find the required numbers ; GCD of the given numbers ; Printing the required numbers ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; void findNumbers ( int a , int b ) { int gcd = __gcd ( a , b ) ; cout << ( a / gcd ) << " ▁ " << ( b / gcd ) ; } int main ( ) { int a = 12 , b = 16 ; findNumbers ( a , b ) ; return 0 ; }