#include <iostream>
using namespace std;
class GCD{
public:
int a;
int b;
GCD(int x,int y){
a = x;
b = y;
}
int getGCD(){
int m = a;
int n = b;
while(n != 0){
int r = m % n;
m = n;
n = r;
}
return m;
}
};
int main() {
int x,y;
cin >> x >> y;
GCD g(x,y);
cout << g.getGCD() <<endl;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: