Move euclide out to function
This commit is contained in:
parent
3c101b6967
commit
96415e423e
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue