using System; using System.Linq; class Program { static void Main(string[] args) { int happyDay = 0; int[] days = new int[] { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; for (int month = 1; month <= 12; month++) { for (int day = 1; day <= days[month]; day++) { if (month == (day % 10) + day / 10) happyDay++; } } Console.WriteLine(happyDay.ToString()); } }