完成以下要求:
Console.WriteLine("请输入年份");
string year = Console.ReadLine();
int nianf = Convert.ToInt32(year);
bool a = nianf % 400 == 0 || nianf % 4 == 0 && nianf % 100 != 0;
Console.WriteLine("是否闰年?{0}", a);
Console.ReadKey();
完成以下要求:
Console.WriteLine("请输入年份");
string year = Console.ReadLine();
int nianf = Convert.ToInt32(year);
bool a = nianf % 400 == 0 || nianf % 4 == 0 && nianf % 100 != 0;
Console.WriteLine("是否闰年?{0}", a);
Console.ReadKey();
本文标题:C#第四次作业2
本文链接:https://www.haomeiwen.com/subject/ceeatqtx.html
网友评论