Re: Simple greatest common factor script

2009-11-29 Thread fejky
I have no idea how i missed that. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Simple greatest common factor script

2009-11-29 Thread fejky
Simple script that calculates greatest common factor using euclid's theorem. a = int(input("Enter a: ")) b = int(input("Enter b: ")) m = 1 while True: if m != 0: if b > a: n = b/a m = b % a print b, " : ", a, " = ", n, " i ost ", m b = m