2018-09-29

#include

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 <

    return 0;

}

int gcd(int x,int y)

{while (x!=y)

  if (x

    y=y-x;

  else x=x-y;

  return(y);

}

你可能感兴趣的:(2018-09-29)