#include <iostream>
using namespace std;
int main() {
int n1, n2;
cout << "Enter two numbers:";
cin >> n1 >> n2;
while(n1 != n2) {
if (n1 > n2)
n1 -= n2;
else
n2 -= n1;
}
cout << "HCF =" << n1;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbjEsIG4yOwoJCgljb3V0IDw8ICJFbnRlciB0d28gbnVtYmVyczoiOwoJY2luID4+IG4xID4+IG4yOwoJCgl3aGlsZShuMSAhPSBuMikgewoJCWlmIChuMSA+IG4yKQoJCW4xIC09IG4yOwoJCWVsc2UKCQluMiAtPSBuMTsKCX0KCQoJY291dCA8PCAiSENGID0iIDw8IG4xOwoJCglyZXR1cm4gMDsKfQ==