#include <stdio.h>
#include <conio.h>
int gcd(int a,int b){
if(b>0){
return gcd(b,a%b);
}
return b;
}
void main(){
int a, b,lcm;
clrscr();
printf("Enter 2 values to find GCD & LCM\n");
scanf("%d%d",&a,&b);
lcm=((a*b)/gcd(a,b));
printf("The GCD of numbers %d & %d is %d",a,b,gcd(a,b));
printf("The LCM of numbers %d & %d is %d",a,b,lcm);
getch();
}