惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Cybersecurity and Infrastructure Security Agency CISA
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
量子位
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
小众软件
小众软件
T
Tailwind CSS Blog
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
V
Visual Studio Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Exploit Database - CXSecurity.com
T
Tenable Blog
博客园 - 叶小钗
宝玉的分享
宝玉的分享
P
Privacy International News Feed
T
Tor Project blog
博客园_首页
AWS News Blog
AWS News Blog
雷峰网
雷峰网
C
Cisco Blogs
Help Net Security
Help Net Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - 【当耐特】
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI
K
Kaspersky official blog
人人都是产品经理
人人都是产品经理
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Schneier on Security
博客园 - Franky
W
WeLiveSecurity
L
LINUX DO - 热门话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Proofpoint News Feed
大猫的无限游戏
大猫的无限游戏
腾讯CDC
L
Lohrmann on Cybersecurity
J
Java Code Geeks
美团技术团队
博客园 - 司徒正美
The Cloudflare Blog
V
V2EX

博客园 - josephshi

识别文本文件编码 文件分割 合并 小软件 呵呵 APACHE+ASP.NET 出现问题 compiere/adempiere+pgsql8.2+RHEL4+jdk1.5 学习 memcached 地震... Visual Studio 2008 简体中文正式版下载及序列号(无使用期限限制,正式版) How to Write a Provider Model Retrieving middle rows from a table Snap it! - How to take a screen shot using .NET - josephshi 我用hsqldb "一个特牛的日期时间判断正则表达式"--我的修改版 - josephshi - 博客园 Copy a table from one database to another in SQL Server 2005 个人用Mozilla FIREFOX的感受 RSS阅读量大于页面访问量 美工太差,效果不好看 有点怪怪的 ASP.NET Validation Controls – Important Points, Tips and Tricks Highlight a Row in GridView without a postback using ASP.NET and JavaScript
找出闰年
josephshi · 2008-04-10 · via 博客园 - josephshi

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    
class Program
    
{
        
static void Main(string[] args)
        
{
            List 
<int> leap1=new List <int>();
            List
<int> leap2 = new List<int>();
            
for(int year = 1900;year <= 9999;year++)
            
{
                
if(year % 4 == 0 && year % 100 != 0)
                
{
                    leap1.Add(year);
                }

                
else if(year % 100==0 && year %400==0)
                
{
                    leap2.Add(year);
                }

            }

            Console.WriteLine(
"被4整除的闰年");
            
foreach(int temp in leap1)
            
{
                Console.WriteLine(temp);
            }

            Console.WriteLine(
"被400整除的闰年");
            
foreach(int temp in leap2)
            
{
                Console.WriteLine(temp);
            }

            Console.Read();
        }

    }

}