/* (程序头部注释开始) </p><p>* 程序的版权和版本声明部分
* Copyright (c) 2011, 烟台大学计算机学院学生
* 作 者: 李兆庆
* 完成日期: 2012 年 9 月 10 日
* 输入描述:
* 问题描述及输出: 编写一个C#应用程序,实现功能:输入一个年份,判断是否润年(被4整除,且不被100整除,或者被400整除)
* 程序头部的注释结束
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace No._3
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入您要判断的年份:");
string str = Console.ReadLine();
int x = int.Parse(str);
if (x % 4 == 0 && x % 100 !=0 || x % 400 != 0)
{
Console.WriteLine("您所输入的年份是闰年。。。。");
}
else
{
Console.WriteLine("您输入的年份不是闰年。。。");
}
Console.ReadKey(false);
}
}
}