Skip to content

Instantly share code, notes, and snippets.

@Euler29
Created March 17, 2018 07:48
Show Gist options
  • Save Euler29/c5dd9bfb7e07b749e8d371a57a8b9533 to your computer and use it in GitHub Desktop.
Save Euler29/c5dd9bfb7e07b749e8d371a57a8b9533 to your computer and use it in GitHub Desktop.
OklitAlgorithm
x=int(input("x:"))
y=int(input("y:"))
import math
def oklit_alg(x,y):
if y>x:
return oklit_alg(y,x)
while y!=0:
print("{}={}.{}+{}".format(x,math.floor(x/y),y,x%y))
(x,y)=(y,x%y)
print("ebob:",x)
return x
try:
oklit_alg(x,y)
input()
except Exception as e:
print(str(e))
input()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment