}
static string 闰年(int s )
{
string result;
if (s % 400 == 0 || (s / 100 != 0 && s / 4 == 0))
{
result = "是闰年";
}
else
{
result = "不是闰年";
}
return result;
}
static void 月()
{
int[] dayue = { 1, 3, 5, 7, 8, 10, 12 };
int[] xiaoyue = { 4, 6, 9, 11 };
int[] eryue = { 2 };
for (int i = 0; i < dayue.Length; i++)
{
yue[dayue[i]] = 1;
}
for (int i = 0; i < xiaoyue.Length; i++)
{
yue[xiaoyue[i]] = 2;
}
for (int i = 0; i < eryue.Length; i++)
{
yue[eryue[i]] = 3;
}
}
static string 天( int s )
{
string result="";
switch (yue[s])
{
case 1:
result = "31天";
break;
case 2:
result = "30天";
break;
case 3:
result = "28天";
break;
}
static string 闰年(int s)
{
string result;
if (s % 400 == 0 || (s / 100 != 0 && s / 4 == 0))
{
result = "闰年";
}
else
{
result = "不是闰年";
}
return result;
}
static void 月()
{
int[] dayue = { 1, 3, 5, 7, 8, 10, 12 };
int[] xiaoyue = { 4, 6, 9, 11 };
int[] eryue = { 2 };
for (int i = 0; i < dayue.Length; i++)
{
yue[dayue[i]] = 1;
}
for (int i = 0; i < xiaoyue.Length; i++)
{
yue[xiaoyue[i]] = 2;
}
for (int i = 0; i < eryue.Length; i++)
{
yue[eryue[i]] = 3;
}
}
static string 天(int v ,int s)
{
string result = 闰年(v);
if (result == "闰年")
{
switch (yue[s])
{
case 1:
result = "31天";
break;
case 2:
result = "30天";
break;
case 3:
result = "29天";
break;
}
return result;
}
else
{
switch (yue[s])
{
case 1:
result = "31天";
break;
case 2:
result = "30天";
break;
case 3:
result = "28天";
break;