-
-
Save Euler29/c5dd9bfb7e07b749e8d371a57a8b9533 to your computer and use it in GitHub Desktop.
OklitAlgorithm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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