1 Star 0 Fork 0

dzc/Python-1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gcd.py 408 Bytes
一键复制 编辑 原始数据 按行查看 历史
ethfar 提交于 2019-10-03 00:17 +08:00 . Create gcd.py
"""
This function takes two variable and returns greatest common divisior
"""
def find_gcd(x, y):
while(y):
x, y = y, x % y
return x
# Input from user
print("For computing gcd of two numbers")
a,b = map(int,input("Enter the number by comma separating :-",end = " ").split(","))
# Map typecast the input in 'int' type
print("Gcd of {} & {} is {}",format(a,b,find_gcd(a,b)))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sdredboy/Python-1.git
git@gitee.com:sdredboy/Python-1.git
sdredboy
Python-1
Python-1
master

搜索帮助