aleahim

ReadReversePrintString

Feb 2nd, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.34 KB | None | 0 0
  1. using System;
  2.  
  3. class ReadReversePrintString
  4. {
  5.     public static string ReverseString(string str)
  6.     {
  7.         char[] arr = str.ToCharArray();
  8.         Array.Reverse(arr);
  9.         return new string(arr);
  10.     }
  11.     static void Main()
  12.     {
  13.         string str = Console.ReadLine();
  14.         Console.WriteLine(ReverseString(str));
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment