C语言打印1000-2000年里的闰年
来源:互联网 发布:微信曾经打开淘宝链接 编辑:程序博客网 时间:2024/05/26 02:51
</pre><pre name="code" class="cpp">
1.
<pre name="code" class="cpp">#include "stdio.h"int main(){int year = 0;int i = 0;int count = 0;for (year = 1000; year <= 2000; year++){if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)){count += 1;printf("%d ", year);}}printf("\ncount=%d ", count);getchar();return 0;}
2.
#include "stdio.h"#include "math.h"int main(){int i = 100;int j;int count = 0;for (i = 101; i <= 199; i = i + 2){for (j = 2; j <= sqrt(i); j++)if (i%j == 0) break;if (j > sqrt(i)){count += 1;printf("%d ", i);}}printf("\ncount=%d", count);system("pause");return 0;}
0 0
- C语言打印1000-2000年里的闰年
- C语言如何求闰年,打印输出1000-2000年之间的所有闰年.
- 【C语言】1000~2000之间的闰年
- C语言 判断1000年---2000年之间的闰年,并输出闰年
- 【c语言】判断1000年---2000年之间的闰年
- 【C语言】判断1000年---2000年之间的闰年
- C语言 判断1000年---2000年之间的闰年
- 【c语言】判断1000年---2000年之间的闰年
- 【C语言】判断1000年~2000年之间的闰年。
- C语言:判断1000年---2000年之间的闰年
- C语言判断1000—2000年之间的闰年
- C语言程序 求1000~2000年之间的闰年
- 判断1000~2000年之间的闰年(C语言)
- c语言 求1000到2000之间的闰年
- c语言 求1000到2000之间的闰年
- 打印1000~2000之间的闰年
- C语言实现 判断1000年---2000年之间的闰年
- 【C语言】输出1000年到2000年之间的闰年
- opencv图片处理基础
- C#控制台基础 类的访问修饰符有两个internal与public,不写的话默认是internal
- Spring事务源码分析
- [Linux驱动入门]定时计数
- HDU 5875 Function
- C语言打印1000-2000年里的闰年
- ADB-How it works---system-core-adb
- 使用ILSpy软件反编译.Net应用程序的方法及注意事项
- 杂谈:阿里月饼事件
- 安装gevent遇到的问题
- 百度编辑器
- bzoj4196: [NOI2015]软件包管理器
- 第三周项目4——顺序表应用问题2
- mac如何彻底更改系统语言