Enter Month day, check all kinds, check whether correct
* Year Range 0~9999
* Month Range 1~12
* Scope of the day:
* (1) 31 Days of the month
* (2) 30 days of the month
* The number of people in February of the average year
* (4) Number of February leap years
* If the entered year format is correct, print "* * * * * month * day"
Console.Write ("Enter year:");
int a = Int. Parse (Console.ReadLine ());
Console.Write ("Enter month:");
int b = Int. Parse (Console.ReadLine ());
Console.Write ("Enter Date:");
int c = Int. Parse (Console.ReadLine ());
if (a > 0 && a <= 9999)
{
If (a% 4! = 0)
{
if (b = = 1 | | b = = 3 | | b = = 5 | | b = = 7 | | b = 8 | | b = | | | b = 12)
{
if (C > 0 && C <= 31)
{
Console.WriteLine (A + "year" + B + "month" + C + "Day");
}
Else
{
Console.WriteLine ("Incorrect date input");
}
}
else if (b = = 4 | | b = = 6 | | b = = 9 | | b = = 11)
{
if (C > 0 && C <= 30)
{
Console.WriteLine (A + "year" + B + "month" + C + "Day");
}
Else
{
Console.WriteLine ("Incorrect date input");
}
}
Else
{
if (b = = 2)
{
if (C > 0 && C <= 28)
{
Console.WriteLine (A + "year" + B + "month" + C + "Day");
}
Else
{
Console.WriteLine ("Incorrect date input");
}
}
Else
{
Console.WriteLine ("Incorrect month input");
}
}
}
Else
{
If (a% 400 = = 0 | | (a% 4 = = 0 && A% 100! = 0))
{
if (b = = 1 | | b = = 3 | | b = = 5 | | b = = 7 | | b = 8 | | b = | | | b = 12)
{
if (C > 0 && C <= 31)
{
Console.WriteLine (A + "year" + B + "month" + C + "Day");
}
Else
{
Console.WriteLine ("Incorrect date input");
}
}
else if (b = = 4 | | b = = 6 | | b = = 9 | | b = = 11)
{
if (C > 0 && C <= 30)
{
Console.WriteLine (A + "year" + B + "month" + C + "Day");
}
Else
{
Console.WriteLine ("Incorrect date input");
}
}
Else
{
if (b = = 2)
{
if (C > 0 && C <= 29)
{
Console.WriteLine (A + "year" + B + "month" + C + "Day");
}
Else
{
Console.WriteLine ("Incorrect date input");
}
}
Else
{
Console.WriteLine ("Incorrect month input");
}
}
}
}
}
Else
{
Console.WriteLine ("Incorrect year input");
}
Console.ReadLine (); */
Conditional Statement Practice