当前位置:网站首页>打印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;
}
边栏推荐
- 2020-10-17:刷题1
- HDU 6778 car (group enumeration -- > shape pressure DP)
- 2019.11.20 training summary
- Virtual machine port scanning
- Application of keil5 integrated development environment for single chip microcomputer
- Download control 1 of custom control (downloadview1)
- EDA and VHDL question bank
- 云主机端口扫描
- std::unique_ptr<T>与boost::scoped_ptr<T>的特殊性
- 2019.10.30 learning summary
猜你喜欢

Win32exception (0x80004005): This program is blocked by group policy. For more information, contact your system administrator.

View CSDN blog rankings

Codeforces Round #645 (Div. 2)

September 29, 2020 non commodity templating code level rapidjson Library

Recyclerview universal adapter package

PGP在加密技术中的应用

Web漏洞手动检测分析

在VMware workstation中安装WMware ESXi 6.5.0并进行配置

Web vulnerability manual detection and analysis

Text of the basic component of the shutter
随机推荐
EDA and VHDL question bank
Recurrence of vulnerability analysis for Cisco ASA, FTD and hyperflex HX
The stones game
Solve the problem that zxing's QR code contains Chinese garbled code
C#中Linq常用用法
Substring score - Ultra detailed version - the last programming challenge
Common usage of LINQ in C #
走迷宫 bfs 中等+——最后的编程挑战
查看CSDN的博客排名
完全二叉树的权值 递归做法 ——最后的编程挑战
How can I get the stock account opening discount? Also, is it safe to open an account online?
函数指针、函数指针数组、计算器+转移表等归纳总结
C#中IEqualityComparer接口的实现
1099 build a binary search tree (30 points)
Add/modify/drop column of alter table operation in MySQL
Wandering --- 最后的编程挑战
這個開源項目超哇塞,手寫照片在線生成
2019.10.27 training summary
Shanke's C language 2018 exercise (Telecom)
这个开源项目超哇塞,手写照片在线生成