#include<stdio.h>

int gcd(int a,int b)

{

if(b==0)

return a;

else

return gcd(b,a%b);

}

void main()

{

int x,y;

printf("Enter any two numbers..");

scanf("%d%d",&x,&y);

printf("\nThe gcd of the given two numbers is %d",gcd(x,y));

}

int gcd(int a,int b)

{

if(b==0)

return a;

else

return gcd(b,a%b);

}

void main()

{

int x,y;

printf("Enter any two numbers..");

scanf("%d%d",&x,&y);

printf("\nThe gcd of the given two numbers is %d",gcd(x,y));

}

## No comments:

## Post a Comment