日期:2014-05-17 浏览次数:21146 次
static void Main(string[] args)
{
string a1 = "A1B2C3D4";
string[] temp = new string[a1.Length / 2];
for (int i = 0, j = 0; i < a1.Length && j <= a1.Length; i = i + 2, j++)
{
temp[j] = a1[i] + "" + a1[i + 1];
}
string result = string.Empty;
for (int i = temp.Length - 1; i >= 0; i--)
{
result += temp[i];
}
Console.WriteLine(result);
}
string str = "A1B2C3D4";
int len = str.Length;
int x = len;
string str2 = "";
for (int i = 0; i < len / 2; i++)