题解 | #判断闰年#
判断闰年
https://www.nowcoder.com/practice/a7bcbe3cb86f435d9617dfdd20a16714
#include<stdio.h> int main() { int year=0; scanf("%d",&year); if((year%400==0)||(year%4==0&&year%100!=0)) { printf("yes\n"); } else printf("no\n"); return 0; }
判断闰年
https://www.nowcoder.com/practice/a7bcbe3cb86f435d9617dfdd20a16714
#include<stdio.h> int main() { int year=0; scanf("%d",&year); if((year%400==0)||(year%4==0&&year%100!=0)) { printf("yes\n"); } else printf("no\n"); return 0; }
相关推荐