📌  相关文章
📜  检查 a 是否可整除的程序 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:25.415000             🧑  作者: Mango

代码示例1
# to check if a is programedivisible by 3 or 5
a=int(input('enter first number'))
if a%3==0 and a%5==0:
     print('multiple of 3 and 5 ')#multiple of 15 in short
elif a%5==0 :
     print('multiple of 5')#if statement disturbes then passes to elif or else.
elif a%3==0 :
     print('multiple of 3')
else:
     print("'a' is not a multiple of 3 or 5 ")#this means a is not factor 3,5,15