Console.WriteLine("请输入一段英文");
string str = Console.ReadLine();
string[] s = str.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
Array.Reverse(s);
string st = null;
for (int i = 0; i < s.Length; i++)
{
st += s[i] + " ";
}
Console.WriteLine(st);
Console.ReadLine();
--------------------------------------------------------------------
额,我只记得Array.Reverse();好像是无返回值的,怎么你们都赋值了? |