美文网首页
第四节课第二个作业

第四节课第二个作业

作者: 流影随风 | 来源:发表于2018-10-31 15:12 被阅读0次

#编码

            Console.WriteLine("请输入年份:");

            string str_year = Console.ReadLine();      //输入年份

            int year = Convert.ToInt32(str_year);       //类型转换

            bool b = year % 400 == 0 || (year % 4 == 0 && year % 10 != 0);           //判断是否

            Console.WriteLine("是否正确:{0}",b);

            Console.ReadKey();

#效果

相关文章

网友评论

      本文标题:第四节课第二个作业

      本文链接:https://www.haomeiwen.com/subject/zmeatqtx.html