Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Unknown
- {
- class Program
- {
- static void Main(string[] args)
- {
- string s = Reverse("ABC");
- Console.WriteLine(s);
- }
- public static string Reverse(string text)
- {
- char[] cArray = text.ToCharArray();
- string reverse = String.Empty;
- for (int i = cArray.Length - 1; i > -1; i--)
- {
- reverse += cArray[i];
- }
- return reverse;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement