using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
public static string Reverse(string str)
{
StringBuilder Reverse=new StringBuilder();
char[] c=str.ToCharArray();
for(int i=c.Length-1;i>=0;i--)
{
Console.Write(c[i]);
}
return Reverse.ToString();
}
static void Main(string[] args)
{
string s;
s=Console.ReadLine();
string re = Reverse(s);
Console.ReadKey();
}
}
}
2016年c#实验3.2:实验字符串反转
最新推荐文章于 2022-10-02 17:30:00 发布