麻烦高手详细讲一下这个程序,虽然不难,可是我不太明白原理。
虽然不难,可是我不太明白原理。请高手给我详细讲一下好吗?
static void Main(string[] args) { Console.WriteLine("请输入一个字符串,将会反序输出:"); string words = Console.ReadLine(); char[] strchar = words.ToCharArray(); for (int index = strchar.Length - 1; index >= 0; index--) { Console.Write(strchar[index]); } Console.ReadLine(); }