Snippets has posted 5883 posts at DZone. View Full User Profile
Euclid(a, b) calculates the largest common denominator d, and returns it.
Uses the well-known Euclid's algorithm.
def euclid(a, b):
while b != 0:
r = a % b
a = b
b = r
DZone's 170th Refcard is an essential reference to Camel, an open-source, lightweight, integration library. This Refcard is authored by...