#include <iostream>
using namespace std;
int main()
{
int n1, n2, max;
cout << "Enter two numbers:";
cin >> n1 >> n2;
// maximum value between n1 and n2 is stored in max
max = (n1 > n2) ? n1 : n2;
do
{
if (max % n1 == 0 && max % n2 == 0)
{
cout << "LCM =" << max;
break;
}
else
++max;
}while(true);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKQp7CglpbnQgbjEsIG4yLCBtYXg7CgkKCWNvdXQgPDwgIkVudGVyIHR3byBudW1iZXJzOiI7CgljaW4gPj4gbjEgPj4gbjI7CgkKCS8vIG1heGltdW0gdmFsdWUgYmV0d2VlbiBuMSBhbmQgbjIgaXMgc3RvcmVkIGluIG1heAoJbWF4ID0gKG4xID4gbjIpID8gbjEgOiBuMjsKCQoJZG8KCXsKCQlpZiAobWF4ICUgbjEgPT0gMCAmJiBtYXggJSBuMiA9PSAwKQoJCXsKCQkJY291dCA8PCAiTENNID0iIDw8IG1heDsKCQkJYnJlYWs7CgkJfQoJCWVsc2UKCQkrK21heDsKCX13aGlsZSh0cnVlKTsKCQoJcmV0dXJuIDA7Cn0=