#include
#include
void main()
{
int a,b,c,large,small;
clrscr();
printf("Enter two numbers:");
scanf("%d%d",&a,&b);
small=a; large=b;
if(small>b)
{
small=b;
large=a;
}
while(large%small!=0)
{
c=large%small;
large=small;
small=c;
}
printf("The g c d of %d && %d = %d",a,b,small);
getch();
}
0 comments:
Post a Comment