编程实践5-6
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace sj5_6 { class Program { static void Main(string[] args) { string strA, strB; //string strC, strD; int j; strA = "aeiouAEIOU"; strB = Console.ReadLine(); //strC = ""; //strD = ""; for (int i = 0; i < strB.Length; i++) { if (strA.Contains(strB[i])) { j = strB.Length; //strC = strB.Substring(0, i); //strD = strB.Substring(i + 1, j - i - 1); strB = strB.Substring(0, i) + strB.Substring(i + 1, j - i - 1); i--; } } Console.Write(strB); Console.ReadKey(true); } } }