Move euclide out to function

This commit is contained in:
flyingscorpio@pinebookpro 2022-01-24 09:41:38 +01:00
parent 3c101b6967
commit 96415e423e
2 changed files with 8 additions and 0 deletions

View file

@ -16,6 +16,10 @@ def main():
a = int(input("a : "))
b = int(input("b : "))
calculate(a, b)
def calculate(a, b):
if b > a:
a, b = b, a

View file

@ -16,6 +16,10 @@ def main():
a = int(input("a : "))
b = int(input("b : "))
calculate(a, b)
def calculate(a, b):
if b > a:
a, b = b, a