#include <stdio.h>
int main()
{
int num1, num2, temp;
scanf("%d %d", &num1, &num2);
printf("Enter two numbers : %d %d\n", num1, num2);
int a= num1;
int b= num2;
while(num2!=0)
{
temp=num2;
num2=num1%num2;
num1=temp;
}
printf("HCF of %d and %d is %d\n", a,b,num1);
int lcm= (a*b)/num1;
printf("LCM of %d and %d is %d\n", a,b,lcm);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: