So the first thing to do is find the greatest common divisor of the 2 numbers using the Euclidean Algorithm, (I'm going to use the numbers 327, 33 and 18)

We have the equation: 33x + 18y = 327

33 = 1 * 18 + 15

18 = 1 * 15 + 3

15 = 5 * 3 + 0

And so the GCD is 3. Using the extended Euclidean algorithm, I get:

3 = 18 * (2) + 33 * (-1)

Scaling that up to 327:

Now how do I transform the equation into one parameter, (we used 't' as the parameter in our class).

As it is now, it says I bought 21.8 bottles of beer and -10.9 bottles of coke...