![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
编程求闰年,闰年怎么编程,闰年
Sainbo
这个作者很懒,什么都没留下…
展开
-
编程求闰年
# include<stdio.h># include<windows.h>void main(){ int year, leap; printf("please enter a year:"); scanf("%d", &year); if (year % 4 != 0) leap = 0; /*不能被4整除不是闰年*/ else if (year % 100 != 0) leap = 1; ...原创 2022-03-28 16:08:57 · 307 阅读 · 0 评论 -
计算闰年,自定义10000年以内的。数从8772起,求教?
#includemain(){int year;year = 0;for (year = 0; year {if ((year % 4 == 0 && year % 100 != 0 || year % 400 == 0))printf("%d is a leap year\n", year);}}计算结果如下:8772 is a l原创 2017-10-21 21:39:09 · 495 阅读 · 0 评论