Which option can be used to find the GCD and LCM of two numbers
Answers
Answered by
1
Answer:
Let's say you want to calculate the GCD and LCM of two numbers: 12 and 28. First, determine the prime factorizations of 12 = 2 × 2 × 3 and 28 = 2 × 2 × 7. The GCD is the string that is present in both sets of factorizations, i.e., 2 × 2 = 4. The LCM is the greatest power of all exponents; i.e., 2 × 2 × 3 × 7 = 84.
Answered by
0
Answer:
The program output is also shown below.
1. *C program to find the HCF and LCM of two integers using Euclids' algorithm.
2. int num1, num2, gcd, Icm, remainder, numerator, denominator;
3. printf("Enter two numbers\n");
4. scanf("%d %d", &num1, &num2);
5. if (num1 > num2)
6. numerator = num1;
7. denominator = num2;
8. numerator = num2;
Similar questions
Social Sciences,
1 month ago
English,
2 months ago
Math,
2 months ago
English,
9 months ago
Math,
9 months ago
Computer Science,
9 months ago