#include<stdio.h>
int gcd(int,int);
int main()
{
int a,b;
printf("Type 2 values to find GCD :\n");
scanf("%d %d",&a,&b);
printf("GCD : %d",gcd(a,b));
return 0;
}
int gcd(int m,int n)
{
if(n>m) return gcd(n,m);
if(n==0) return m;
return gcd(n,m%n);
}
A Tech publication for all. Get Knowledge about Web Development, Programming, and trending news, tutorials, and tools for beginners to experts.
Friday, September 23, 2016
Subscribe to:
Post Comments (Atom)
Featured post
🛠 Ultimate Worldwide Database Bundle for Developers & SaaS Apps
🌍 World Geo Data — Full Country, State, City & Currency Dataset This repository provides an overview of the World Geo Data digital pro...
No comments:
Post a Comment