using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace 判断奇偶 { class Program { static void Main(string[] args) { Console.WriteLine("判断奇偶"); int a = int.Parse(Console.ReadLine()); int iTest = a % 2; switch(iTest) { case 0: Console.WriteLine("是偶数"); break; default: Console.WriteLine("是奇数"); break; } Console.ReadLine(); } } }