123456789101112131415 |
- def euklid_ggt(x, y):
- while x > 0:
- if x < y:
- (x, y) = (y, x)
- x -= y
- return y
-
-
- if __name__ == "__main__":
- print(euklid_ggt(12, 8))
- print(euklid_ggt(8, 12))
- print(euklid_ggt(12, 12))
- print(euklid_ggt(12, 1))
- print(euklid_ggt(1, 12))
- print(euklid_ggt(1, 1))
|