```
i want solution of a c prog using functions ie to find lcm and gcd using functions in same program but to find lcm we will be using formula lcm=(a*b)/gcd;
please help me out
this is my code if modifiction are to be done then please send me modified code
gcd(int,int);
lcm(int,int);
void main()
{
int a,b,gcd1,lcm1;
clrscr();
printf("Enter the values for a and b");
scanf("%d %d",&a,&b);
gcd1=gcd(a,b);
lcm1=lcm(a,b);
printf("\n gcd is %d \n lcm is %d",gcd1,lcm1);
}
gcd(int c,int d)
{
int r;
do
{
r=c%d;
c=d;
d=r;
}while(r!=0);
return c;
}
lcm(int a,int b)
{
int lc;
lc=(a*b)/gcd1;
return lc;
}
```

-2