I know how to apply Euclidean algorithm when a is greater then b, but I'm not quite sure what to do when b is greater than a.

For example a = 111 and b = 201. How do I solve this? Is it possible?

In google type:

Euclidean algorithm online

When you see list of result click on:
Euclid's Algorithm Calculator-Calculator Soup-Online Calculators

When page be open type your numbers and click otion Calculate

just switch them,

since you are probably using the algorithm to find the highest common factor,
both 201/111 or 111/201 would have the same common factor.

201 = 1x111 + 90
111 = 1x90 + 21
90 = 4x21 + 6
21 = 3x6 + 3
6 = 2x3 + 0

so the gcd is 3

Oh okay just making sure that was the case. Thank you all who responded :)

When applying the Euclidean algorithm, it's important to note that the order of the values doesn't matter. Whether a is greater than b or vice versa, the algorithm can still be used to find the greatest common divisor (GCD) of the two numbers.

To solve the example where a = 111 and b = 201, you can follow these steps:

1. Divide the larger number, 201, by the smaller number, 111, and find the remainder.
201 divided by 111 equals 1, with a remainder of 90.

2. Now, set the larger number, 201, to the previously found remainder, and set the smaller number, 111, to the previous larger number.
So, a = 111, and b = 90.

3. Repeat the process. Divide 111 by 90 and find the remainder.
111 divided by 90 equals 1, with a remainder of 21.

4. Again, set the larger number, 111, to the remainder, and set the smaller number, 90, to the previous larger number.
Now, a = 90, and b = 21.

5. Continue with the process. Divide 90 by 21 and find the remainder.
90 divided by 21 equals 4, with a remainder of 6.

6. Replace a with the remainder, 21, and b with the previous larger number, 6.
Now, a = 21, and b = 6.

7. Divide 21 by 6 and find the remainder.
21 divided by 6 equals 3, with no remainder.

8. Finally, when the remainder becomes 0, the process stops, and the GCD is the last non-zero remainder, which is 3 in this case.

Therefore, the GCD of 111 and 201 is 3.

Remember, the Euclidean algorithm can be applied regardless of the order of the numbers.