RECURSIVE LCM FINDER
This program displays the LCM of 2 numbers using a recursive function
#include"stdio.h"
main()
{
int a,b,c;
clrscr();
printf("enter 2 numbers:");
scanf("%d %d",&a,&b);
if(b>a)
{
c=b;
b=a;
a=c;
}
f(a,b);
printf("%d is their LCM",a*b/f(a,b));
getch();
}
f(a,b)
{
if(a%b==0)
return(b);
else
f(b,a%b);
}