int r=0,ca=a,cb=b;
while(b)
{
r=a%b;
a=b;
b=r;
}
cout<<ca/a<<endl<<"--"<<b/cb;
Show life that you have a thousand reasons to smile
© Copyright 2024 DOKU.TIPS - All rights reserved.
int r=0,ca=a,cb=b;
while(b)
{
r=a%b;
a=b;
b=r;
}
cout<<ca/a<<endl<<"--"<<b/cb;