我最亲爱的说

子非鱼,焉知鱼之乐.

导航

编程实践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);
        }
    }
}

posted on 2012-11-28 09:06  我最亲爱的说  阅读(147)  评论(0编辑  收藏  举报