The WSQ12 asked me to do a program that calculatesthe gcm, which is the greatest common divisor, the largest number that both number had as divisor.
It asked to use the algorithm of a greek guy named Euclidean, so I entered wikipedia, the best site for quick info, and the first thing I se is a bunch of symbols and letters, soooooooooo I quit
Then I was like, f it, amagona do my own algorithm with tacos and tequila, so I took a piece pof paper and solved one problem, 63 and 49. Here is the pic:
Sooo is like the x 63 module y 49, the reesidual is i 14, Then, x takes the value of y, and y the value of i, and then I repeat the process until the residual is cero
so the code will be:
i = x mod y
x = y
y = i
and repeat, and here it is:
Well… at last, I see is kind of similar as the one of Euclidean, soooo, it was allright 🙂
As always