author | Madhusudan.C.S <madhusudancs@gmail.com> |
Fri, 14 Aug 2009 11:07:24 +0530 | |
changeset 49 | 33c54f815fd5 |
parent 8 | 294ff7ac9cb6 |
permissions | -rwxr-xr-x |
8
294ff7ac9cb6
Added new set of files.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
1 |
def gcd(a, b): |
294ff7ac9cb6
Added new set of files.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
2 |
if a % b == 0: |
294ff7ac9cb6
Added new set of files.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
3 |
return b |
294ff7ac9cb6
Added new set of files.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
4 |
return gcd(b, a %b) |
294ff7ac9cb6
Added new set of files.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
5 |
|
294ff7ac9cb6
Added new set of files.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
6 |
print gcd (10, 20) |