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)Bart spends $32.70 buying Beer and Coke for a party.

Beer costs $3.30 each and Coke costs $1.80 each.

How many bottles of each did he buy?

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:

$\displaystyle 327 = \underbrace{18 \cdot (2 \cdot 109)}_{\text{Beer}} + \underbrace{33 \cdot (-1 \cdot 109)}_{\text{Coke}}$

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...