如何用C#打印倒序!!!急啊!!!!
比如我输入123然后结果是321 --------------------编程问答-------------------- for循环
--------------------编程问答-------------------- private string reverse(string source)
{
char[] c = source.ToCharArray();
Array.Reverse(c);
return new String(c);
} --------------------编程问答-------------------- string s= "123";
for(int i=s.length-1;i>=0;i--)
{
Console.WriteLine(s[i]);
}
--------------------编程问答--------------------
char s = "123";
char[] c = s.ToCharArray();
Array.Reverse(c);
Console.Write(new string(c));
补充:.NET技术 , C#