【编程】题目1: (逆序输出)定义一个字符数组,输入10个字符到数组中,将字符数组内容倒序输出。 比如: 输入:a b c d e f g h i j 输出:j i h g f e d c b a
答:
public static void Main(string[] args)
{
Console.WriteLine("输入:a b c d e f g h i j");
string rawStr = "a b c d e f g h i j";
string nweStr = new string(rawStr.Reverse().ToArray<char>());
Console.WriteLine(nweStr);
Console.ReadKey();
}
【编程】题目1:(逆序输出)定义一个字符数组,输入10个字符到数组中,将字符数组内容倒序输出。比如:输入:a b c d e f g h i j输出:j i h g f e d c b a答:public static void Main(string[] args) { Console.WriteLine("输入:a b c d e f ...