判断闰年

n = int(input("输入一个数"))
if n % 4 ==0 and n % 100 != 0 or n % 400 == 0:
print("yes")
else:
print("no")



以上是一个判断是否是闰年的小程序,这里我们需要记住的是四年一闰,百年不闰,四百年在闰
posted @ 2020-10-13 16:12  世俗-  阅读(66)  评论(0)    收藏  举报