Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication7
- {
- class Program
- {
- static void Main(string[] args)
- {
- string input = Console.ReadLine();
- Console.WriteLine(ReverseString(input));
- }
- static string ReverseString(string someString)
- {
- StringBuilder reverse = new StringBuilder();
- for (int i = someString.Length - 1; i >= 0; i--)
- {
- reverse.Append(someString[i]);
- }
- return reverse.ToString();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment