ZOHO Short method to two GCD of two numbers in CPP It comes under algorithm library of CPP so , #include is must to use this function. #include #include using namespace std; int main() { int a , b; cin>>a>>b; int gcd = __gcd(a,b); cout<

Short method to two GCD of two numbers in CPP It comes under algorithm library of CPP so , #include is must to use this function. #include #include using namespace std; int main() { int a , b; cin>>a>>b; int gcd = __gcd(a,b); cout<

ZOHO

KAUSTUBH DWIVEDI

1
1
2047

1 year agoSolved

Short method to two GCD of two numbers in CPP
It comes under algorithm library of CPP so , #include<algorithm> is must to use this function.
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
int a , b;
cin>>a>>b;
int gcd = __gcd(a,b);
cout<<gcd;
return 0;
}