#include<stdio.h>
int gcd(int m,int n)
{
return (n==0)?m:gcd(n,(m%n));
}
void main()
{
int m,n;
printf("ENTER THE TWO INTEGERS M AND N\n");
scanf("%d%d",&m,&n);
printf("THE GCD OF (%d,%d)=%d",m,n,gcd(m,n));
}
int gcd(int m,int n)
{
return (n==0)?m:gcd(n,(m%n));
}
void main()
{
int m,n;
printf("ENTER THE TWO INTEGERS M AND N\n");
scanf("%d%d",&m,&n);
printf("THE GCD OF (%d,%d)=%d",m,n,gcd(m,n));
}
No comments:
Post a Comment