Skip to content

Commit

Permalink
Merge pull request tarunsinghofficial#1833 from pereiraIgor/main
Browse files Browse the repository at this point in the history
adicionando função para calculo de mdc e gdc
  • Loading branch information
tarunsinghofficial committed Oct 20, 2021
2 parents 5fb5500 + f4d5359 commit 1197fba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Python-programming-1/mdc_gdc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def gcd(a,b):
if a == 0: return b
if b == 0: return a
return gcd(b, a%b)

def mmc(a,b):
return (a/gcd(a,b))*b

0 comments on commit 1197fba

Please sign in to comment.