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

1
1
1612

7 months 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;
}