diff --git a/CPP/gcd_theorem.cpp b/CPP/gcd_theorem.cpp new file mode 100644 index 0000000..3d223c6 --- /dev/null +++ b/CPP/gcd_theorem.cpp @@ -0,0 +1,18 @@ +#include +using namespace std; + +int GCD(int a, int b) +{ + if (!b) //if b==0 + return a; + else + return GCD(b,a%b); +} + +int main() +{ + cout<<"Provide two number (separated by space) whose HCF is to be found: "; + int a,b; + cin>>a>>b; + cout<