用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:包的定义与运行有包名的主类
  • 热门搜索
    干炸黄花鱼的做法 干烧鱼的做法 凉拌笋丝的做法 酸梅汤做法 番茄大虾的做法 廿怎么读 蒸鸡蛋糕的做法 肉馅饼的做法 豆干的做法 etc被拉入黑名单了怎么办