using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace 判断元音辅音字母 { class Program { static void Main(string[] args) { char R; string str = ""; Console.WriteLine("输入一个小写字母:"); R = Convert.ToChar(Console.Read()); switch(R) { case 'a': str = "元音字母"; break; case 'e': str = "元音字母"; break; case 'i': str = "元音字母"; break; case 'o': str = "元音字母"; break; case 'u': str = "元音字母"; break; default: str = "辅音字母"; break; } Console.WriteLine("该字母是{0}",str); Console.ReadKey(); } } }