Final answer:
The Consecutive Integer Checking Algorithm finds the GCD of two integers by checking consecutively from the smaller number down to 2 for a common divisor. If none is found, the GCD is 1.
Step-by-step explanation:
Consecutive Integer Checking Algorithm for GCD
The Consecutive Integer Checking Algorithm is a method used to find the Greatest Common Divisor (GCD) of two non-negative, non-zero integers. This algorithm involves checking integers consecutively from the smallest of the two given numbers down to 2 (inclusive) to find the largest integer that divides both numbers without leaving a remainder. Here is a step-by-step explanation of the algorithm:
- Identify the smaller number of the two given integers.
- Starting from this smallest number, check each integer to see if it divides both of the given numbers without leaving a remainder.
- If you find a number that divides both, that number is the GCD.
- If no number is found by the time you reach 2, then the GCD is 1, since 1 divides any integer.
For example, to find the GCD of 48 and 18, we would start at 18 (the smaller number) and work down. We would find that 6 is the largest number that divides both 48 and 18, hence 6 is the GCD.