#include#define LeapYear(y) (y%4==0&&y%100!=0)||(y%400==0) int main() { int year; printf("请输入一个年份n"); scanf("%d", &year); if (LeapYear(year)) { printf("%d是闰年", year); } else printf("%d不是闰年", year); return 0; }
欢迎分享,转载请注明来源:内存溢出
#include#define LeapYear(y) (y%4==0&&y%100!=0)||(y%400==0) int main() { int year; printf("请输入一个年份n"); scanf("%d", &year); if (LeapYear(year)) { printf("%d是闰年", year); } else printf("%d不是闰年", year); return 0; }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)