Find the other number when LCM and HCF given | CPP program to find other number from given HCF and LCM ; Function that will calculates the zeroes at the end ; Driver code ; Calling function .
#include <bits/stdc++.h> NEW_LINE using namespace std ; int otherNumber ( int A , int Lcm , int Hcf ) { return ( Lcm * Hcf ) / A ; } int main ( ) { int A = 8 , Lcm = 8 , Hcf = 1 ; int result = otherNumber ( A , Lcm , Hcf ) ; cout << " B ▁ = ▁ " << result ; return 0 ; }