当前位置:网站首页>打印1000~2000年之间的闰年(C语言)
打印1000~2000年之间的闰年(C语言)
2022-06-29 09:27:00 【西宏柿王多鱼】
闰年:能被4整除不能被100整除,或者能被400整除
代码表述:((year%4==0)&&(year%100)!= 0)||(year%400)==0
#include <stdio.h>
int main()
{
int year=0;
printf("1000~2000年间的闰年:\n");
for(year=1000;year<=2000;year++)
{
if(((year%4==0)&&(year%100)!= 0)||(year%400)==0)
printf("%d ",year);
}
return 0;
}
边栏推荐
- winform使用zxing生成二维码
- 解决zxing的QR码包含中文时乱码的问题
- PGP在加密技术中的应用
- To 3 -- the last programming challenge
- 2021 team programming ladder competition - Simulation Competition
- Codeforces Round #641 Div2
- 1021 Deepest Root (25 分)
- 在实践中学习Spark计算框架(00)
- [51nod 1215] array width
- This open source project is super wow, and handwritten photos are generated Online
猜你喜欢

Basic operations during dev use

《CLR via C#》读书笔记-单实例应用程序

Vmware的下载与安装(基本思路+详细过程)

View CSDN blog rankings

The stones game

October 17, 2020: question brushing 1

Codeforces Round #659 (Div. 2)

Recyclerview sticky (suspended) head

HDU 6778 car (group enumeration -- > shape pressure DP)

Rikka with cake (segment tree + segment tree)
随机推荐
Related problems of pointer array, array pointer and parameter passing
《CLR via C#》读书笔记-单实例应用程序
Solve the problem that zxing's QR code contains Chinese garbled code
[51nod 1215] array width
函数指针、函数指针数组、计算器+转移表等归纳总结
October 17, 2020: question brushing 1
BUUCTF--内涵的软件
Use of Azkaban in task scheduler
2020-09-18 referer authentication URL escape
L1-009 N个数求和 (20 分)
Arc view and arc viewpager
To 3 -- the last programming challenge
1099 Build A Binary Search Tree (30 分)
Dev使用过程中的基本操作
这个开源项目超哇塞,手写照片在线生成
51nod1277 maximum value in string [KMP]
InnoDB in MySQL_ page_ Cleaners details
云主机端口扫描
L2-031 深入虎穴 (25 分)
在VMware workstation中安装WMware ESXi 6.5.0并进行配置