Sunday, 21 January 2018

Program for GCD


Program for GCD
#include<stdio.h>
#include<conio.h>
main()
{
int m,n,r;
clrscr();
printf("enter the m,n value");
scanf("%d%d",&m,&n);
while(n!=0)
{
r=m%n;
m=n;
n=r;
}
printf("GCD of given no Is%d",m);
getch();
}

0 comments:

Post a Comment