Console.WriteLine("请输入数据");
string words = Console.ReadLine();
StringBuilder newStr = new StringBuilder();
for (int i = words.Length; i > 0; i--)
{
newStr.Append(words.Substring(i - 1, 1));
}
Console.WriteLine(newStr);
Console.ReadKey();
这样也可以的,方法其实还是很多的啊 |
|