using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication2{ class Program { static void Main(string[] args) { string [] words = null; StringBuilder strBuff = null; while (true) { try { System.Console.WriteLine("请输入英文字符串!(单词间用空格分隔)"); words = System.Console.ReadLine().Split(new char[] { ' ' }); if (words.Length > 0) { strBuff = new StringBuilder(); strBuff.Append(words[0].ToLower()); for (int i = 1; i < words.Length; i++) { words[i] = words[i].ToLower(); strBuff.AppendFormat("{0}{1}", Char.ToUpper(words[i][0]), words[i].Substring(1)); } System.Console.WriteLine("结果:{0}", strBuff.ToString()); break; } } catch { System.Console.WriteLine("输入不正确!请重新输入"); } } System.Console.Read(); //按回车结束程序 } }}