static void Main (string[] args)
{
while (true)
{
int m1 = 31; int m2 = 28; int m3 = 31; int m4 = 30; int M5 = 31; int M6 = 30; int M7 = 31; int m8 = 31; int M9 = 30; int m10 = 31; int M11 = 30;
Console.Write ("Please enter the month");
int m = Convert.ToInt32 (Console.ReadLine ());
Console.Write ("Please enter the date");
int d = Convert.ToInt32 (Console.ReadLine ());
Switch (m)//If CASE1 is set up, simply jump out of the switch's curly brace and proceed directly to the next step. Switch followed by curly braces, case and break must be in conjunction with, and finally do not forget the default and break with the.
{
Case 1:
Console.Write ("+d+", "Day");
Break
Case 2:
Console.Write ("First" + (m1+ D) + "Day");
Break
Case 3:
Console.Write ("First" + (M1+M2+D) + "Day");
Break
Case 4:
Console.Write ("First" + (M1+M2+M3+D) + "Day");
Break
Case 5:
Console.Write ("First" + (M1+M2+M3+M4+D) + "Day");
Break
Case 6:
Console.Write ("First" + (M1 + m2 + m3 + m4+m5 + D) + "Day");
Break
Case 7:
Console.Write ("First" + (M1 + m2 + m3 + m4 + M5 +m6+ D) + "Day");
Break
Case 8:
Console.Write ("First" + (M1 + m2 + m3 + M4 + M5 + M6+M7 + D) + "Day");
Break
Case 9:
Console.Write ("First" + (M1 + m2 + m3 + M4 + M5 + M6 + M7+M8 + D) + "Day");
Break
Case 10:
Console.Write ("First" + (M1 + m2 + m3 + M4 + M5 + M6 + M7 + m8+m9 + D) + "Day");
Break
Case 11:
Console.Write ("First" + (M1 + m2 + m3 + M4 + M5 + M6 + M7 + M8 +m9+m10+ D) + "Day");
Break
Case 12:
Console.Write ("First" + (M1 + m2 + m3 + M4 + M5 + M6 + M7 + m8 + M9 + M10+m11 + D) + "Day");
Break
Default
Console.Write ("incorrect input");
Break
}
Console.ReadLine ();
}
Use switch case to determine how many days it is today