C Programming
#include
#include
int A[100];
int lcm(int n1,int n2);
int merge(int f,int l)
{
if(f
{
small=n2;
large=n1;
}
while(large%small!=0)
{
int c=large%small;
large=small;
small=c;
}
return small;
}
void main()
{
clrscr(); int f=0,n,i;
printf("Enter the number:");
scanf("%d",&n);
for(i=0;i
{
scanf("%d",&A[i]);
}
int hg=merge(f,n-1);
printf("G C D=%d",hg);
getch();
}
0 comments:
Post a Comment