Extended Euclid for GCD

After GCD, I introduce you Extended Euclid algorithm to prove GCD of two integer numbers. I repeat, this algorithm only for proving purpose. So, in the end of the code you will only see it's proved oor not. It's said that GCD will fulfill equation below.

1
s*a + t*b = gcd(a, b)
Where s and t is integers. What I did in my program is finding value of s and t then I could prove that my GCD follows Extended Euclid. My codes could be forked here as extended_euclid.py file. Simply go to your terminal and change the directory to x0x folder and run python extended_euclid.py. The terminal console is like my illustration below:

Console view of Extended Euclid Program.
Enter the first number and second number and the program will show you the values of t, s, and also GCD. It will show the proof of Extended Euclid theorem.

Comments

Popular posts from this blog

Making SublimePythonIDE Works on Windows

How to Change Font Type in Sublime Text