1#include <iostream>
2using namespace std;
3
4int main()
5{
6 int n1, n2;
7
8 cout << "Enter two numbers: ";
9 cin >> n1 >> n2;
10
11 while(n1 != n2)
12 {
13 if(n1 > n2)
14 n1 -= n2;
15 else
16 n2 -= n1;
17 }
18
19 cout << "HCF = " << n1;
20 return 0;
21}