Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class ReadReversePrintString
- {
- public static string ReverseString(string str)
- {
- char[] arr = str.ToCharArray();
- Array.Reverse(arr);
- return new string(arr);
- }
- static void Main()
- {
- string str = Console.ReadLine();
- Console.WriteLine(ReverseString(str));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment