Write a program to find LCM and GDC of two numbers.
Answers
Answered by
2
Answer:
The program output is also shown below.
* C program to find the GCD and LCM of two integers using Euclids' algorithm.
int num1, num2, gcd, lcm, remainder, numerator, denominator;
printf("Enter two numbers\n");
scanf("%d %d", &num1, &num2);
if (num1 > num2)
numerator = num1;
denominator = num2;
numerator = num2;
Similar questions