class Program { static void Main(string[] args) { Console.WriteLine("请输入一段字符串"); string str = Console.ReadLine();//获取到控制台输入的字符串 for (int i = str.Length-1; i >=0; i--) { Console.Write(str[i]); } Console.ReadLine(); } }