用Visual Studio判断闰年和非闰年

 时间:2024-10-15 00:13:31

1、打开Visual Studio,选择新建项目。

用Visual Studio判断闰年和非闰年

3、代码 int year; for (int i = 0; i 争犸禀淫< 6; i++) { Console.Write("请输入年乍鋈继琪份: "); year = int.Parse(Console.ReadLine()); if (year % 4 == 0) { if (year % 100 == 0) { if (year % 400 == 0) Console.WriteLine("{0}年是闰年! ", year); else Console.WriteLine("{0}年不是闰年! ", year); } else { Console.WriteLine("{0}年是闰年! ", year); } } else { Console.WriteLine("{0}年不是闰年! ", year); } Console.ReadLine();

用Visual Studio判断闰年和非闰年
  • 在python中如何遍历字典的键-值对或者键、值
  • MySQL管理篇,使用mysqlimport导入文本TXT数据
  • 用css div做两个实体小方块
  • js怎么比较对象中数组的长度?
  • Java:包的定义与运行有包名的主类
  • 热门搜索
    牙龈痛怎么快速止痛 五菱宏光s1怎么样 田园诗词大全100首 在校表现怎么写 抖音歌曲大全 怎么修改照片分辨率 芋头怎么做好吃 基金亏损了怎么办 冷战怎么办 治高血压的最好方法