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: Console.WriteLine(31); break; case 2: Console.WriteLine(28 + p); break; case 3: Console.WriteLine(31); break; case 4: Console.WriteLine(30); break; case 5: Console.WriteLine(31); break; case 6: Console.WriteLine(30); break; case 7: Console.WriteLine(31); break; case 8: Console.WriteLine(31); break; case 9: Console.WriteLine(30); break; case 10: Console.WriteLine(31); break; case 11: Console.WriteLine(30); break; case 12: Console.WriteLine(31); break; default: Console.WriteLine("Pogresan mesec"); break; } } }