If you are looking to know the concept about “**C Program To Find GCD of Two Numbers using Recursion: Euclid’s Algorithm**” then you are in the perfect tutorial. Shall we start the discussion to clarify it below? Come on! Let’s go.

Table of Contents

## C Program To Find GCD of Two Numbers using Recursion: Euclid’s Algorithm

## Program Code

```
#include<stdio.h>
int gcd(int, int);
int main()
{
int num1, num2;
printf("Enter 2 positive integer numbersn");
scanf("%d%d", &num1, &num2);
printf("nGCD of %d and %d is %d.n", num1, num2, gcd(num1, num2));
return 0;
}
int gcd(int n1, int n2)
{
if(n1 == 0) return n2;
if(n2 == 0) return n1;
if(n1 > n2)
return gcd(n1%n2, n2);
else
return gcd(n1, n2%n1);
}
```

I hope this article helps you to know the concept about “**C Program To Find GCD of Two Numbers using Recursion: Euclid’s Algorithm**“. If you face any issues please let me know via the comment section. Share this article with other C/C++ developers via social networks.