static string GetMonth(int month)
case 1: MonthName = "January";
case 2: MonthName = "February";
case 3: MonthName = "March";
case 4: MonthName = "April";
case 5: MonthName = "May";
case 6: MonthName = "June";
case 7: MonthName = "July";
case 8: MonthName = "August";
case 9: MonthName = "September";
case 10: MonthName = "October";
case 11: MonthName = "November";
case 12: MonthName = "December";
default: Console.WriteLine("Invalid month!");
static void SayPeriod(int startMonth, int endMonth)
int period = endMonth - startMonth;
Console.WriteLine("There is {0} months period from {1} to {2}.",
period, GetMonth(startMonth), GetMonth(endMonth));
static void Main(string[] args)
Console.Write("First month (1-12): ");
int firstMonth = int.Parse(Console.ReadLine());
Console.Write("Second month (1-12): ");
int secondMonth = int.Parse(Console.ReadLine());
SayPeriod(firstMonth, secondMonth);