using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { int HAPPY_DAY = 0; int[] month31 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 4 }; int[] month30 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3 }; int[] month28 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; foreach (int month in month31) { if (month == 1) { HAPPY_DAY++; } if (month == 3) { HAPPY_DAY++; } if (month == 5) { HAPPY_DAY++; } if (month == 7) { HAPPY_DAY++; } if (month == 8) { HAPPY_DAY++; } if (month == 10) { HAPPY_DAY++; } if (month == 12) { HAPPY_DAY++; } } foreach (int month in month30) { if (month == 4) { HAPPY_DAY++; } if (month == 6) { HAPPY_DAY++; } if (month == 9) { HAPPY_DAY++; } if (month == 11) { HAPPY_DAY++; } } foreach (int month in month28) { if (month == 2) { HAPPY_DAY++; } } Console.WriteLine(HAPPY_DAY); } } }