using System; class BrojDanaUMesecu { static void Main() { Console.WriteLine("Mesec: "); int m = int.Parse(Console.ReadLine()); Console.WriteLine("Godina: "); int g = int.Parse(Console.ReadLine()); // ispitamo da li je g prestupna godina int p = 0; if (g % 400 == 0 || g % 100 != 0 && g % 4 == 0) { p = 1; } // ispisujemo broj dana u mesecu m switch(m) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: Console.WriteLine(31); break; case 4: case 6: case 9: case 11: Console.WriteLine(30); break; case 2: Console.WriteLine(28 + p); break; default: Console.WriteLine("Pogresan mesec"); break; } } }