#include <iostream>
using namespace std;
int main()
{int gcd(int x,int y);
int a,b,c;
cout<<"please enter two numbers:";
cin>>a>>b;
c=gcd(a,b);
cout <<c<< endl;
return 0;
}
int gcd(int x,int y)
{while (x!=y)
if (x<y)
y=y-x;
else x=x-y;
return(y);
}
网友评论