একটি সংখ্যা A, LCM এবং HCF (GCD) দেওয়া আছে। অন্য সংখ্যা B বের করুন। সূত্র: A × B = LCM × HCF => B = (LCM × HCF) / A।
উদাহরণ
#include <iostream>
using namespace std;
int anotherNumber(int A, int LCM, int GCD) {
return (LCM * GCD) / A;
}
int main() {
cout << "Another number: " << anotherNumber(5, 25, 4);
return 0;
}
আউটপুট
Another number: 20