当前位置:网站首页>Print leap years between 1000 and 2000 (C language)
Print leap years between 1000 and 2000 (C language)
2022-06-29 10:37:00 【Xihong Shiwang has many fish】
Leap year : Can be 4 Division cannot be 100 to be divisible by , Or can be 400 to be divisible by
Code representation :((year%4==0)&&(year%100)!= 0)||(year%400)==0
#include <stdio.h>
int main()
{
int year=0;
printf("1000~2000 The leap year of the year :\n");
for(year=1000;year<=2000;year++)
{
if(((year%4==0)&&(year%100)!= 0)||(year%400)==0)
printf("%d ",year);
}
return 0;
}
边栏推荐
- SQL Server 数据库增删改查语句
- Downloading and installing VMware (basic idea + detailed process)
- 1147 heaps (30 points)
- IO流总结
- 1099 build a binary search tree (30 points)
- Weight recursion of complete binary tree -- the last programming challenge
- Oracle重置序列发生器(非重建)
- Summary after the 2009 ICPC Shanghai regional competition
- 查看CSDN的博客排名
- 2019.10.30 learning summary
猜你喜欢

Recyclerview universal adapter package

Web漏洞手动检测分析

C#窗体向另一个窗体实时传值

攻防世界-Re-insfsay

软件测试模型(V模型和W模型)

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

《CLR via C#》读书笔记-加载与AppDomain

Linux下Redis安装及集群搭建

Slide the custom control to close the activity control

全面理解Synchronized
随机推荐
DevExpress的双击获取单元格数据
Dev使用过程中的基本操作
mysql 8.0 一条insert语句的具体执行流程分析(三)
Fully understand the MESI cache consistency protocol
This open source project is super wow, and handwritten photos are generated Online
2020-09-18 referer authentication URL escape
Oracle reset sequence generator (non rebuild)
全面理解MESI缓存一致性协议
Graphics learned from jigsaw puzzles h
1147 heaps (30 points)
查看CSDN的博客排名
Web漏洞手动检测分析
给定两个整形变量的值,将两个值的内容进行交换 (C语言)
2020-9-14 introduction to advertising system
拼图小游戏中学到的Graphics.h
2019.11.17 training summary
Devaxpress double click to get cell data
2019-11-10 training summary
MySQL中的alter table操作之add/modify/drop列
2020-09-21 visual studio header file and Library Directory configuration