本帖最后由 czwanglei 于 2014-6-7 09:28 编辑
string[] ls = { "3", "a", "8", "haha" };
for (int i = 0, j = ls.Length - 1; i < j; i++, j--)
{
string temp = "";
temp = ls;
ls = ls[j];
ls[j] = temp;
}
for (int i = 0; i < ls.Length;i++ )
{
Console.WriteLine(ls);
}
Console.ReadLine();
对于翻转问题一直很迷,还有冒泡排序问题,求解释 |