From 2f9466f6e59640820a248f89b8cc06a0b1f8d1cd Mon Sep 17 00:00:00 2001 From: i-vishi Date: Tue, 2 Oct 2018 02:56:41 +0530 Subject: [PATCH 1/2] Create GCD.cpp --- GCD.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 GCD.cpp diff --git a/GCD.cpp b/GCD.cpp new file mode 100644 index 000000000..2b475128a --- /dev/null +++ b/GCD.cpp @@ -0,0 +1,17 @@ + +// C++ program to find GCD of two numbers +#include + +// Recursive function to return gcd of a and b +int gcd(int a, int b){ + if (b == 0) + return a; + return gcd(b, a % b); +} + +int main(){ + int a, b; + cin>>a>>b; + cout<<"GCD of "< Date: Tue, 2 Oct 2018 02:57:23 +0530 Subject: [PATCH 2/2] Rename GCD.cpp to CPP/GCD.cpp --- GCD.cpp => CPP/GCD.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename GCD.cpp => CPP/GCD.cpp (100%) diff --git a/GCD.cpp b/CPP/GCD.cpp similarity index 100% rename from GCD.cpp rename to CPP/GCD.cpp