将所输入的数字,以相反顺序打印出来,并且显示它时几位数。列如12345打印为54321   

解决方案 »

  1.   


    string input = Console.ReadLine();
    for(int i=input.Length-1;i>=0;i--)
    {
        Console.Write(input[i]);
    }
      

  2.   

     
      int[] intarray = { 1,2,3,4,5};
                IEnumerable<int> e=intarray.Reverse();
                foreach (int i in e)
                {
                    Console.Write(i);
                }
                Console.WriteLine("Length:{0}",e.Count());
      

  3.   

    public static string Reverse(string s)
      {
      char[] charArray = s.ToCharArray();
      System.Array.Reverse(charArray);
      return new string(charArray);
      }
      

  4.   

    public static string Reverse(string s)
      {
      char[] charArray = s.ToCharArray();
      System.Array.Reverse(charArray);
      return new string(charArray);
      }
      

  5.   

    string input = Console.ReadLine();
    for(int i=input.Length-1;i>=0;i--)
    {
        Console.Write(input[i]);
    }