Advertisement
Qrist

Reverse Char

Mar 29th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Unknown
  4. {
  5.     class Program
  6.     {  
  7.        
  8.         static void Main(string[] args)
  9.         {
  10.             char a = char.Parse(Console.ReadLine());
  11.             char b = char.Parse(Console.ReadLine());
  12.             char c = char.Parse(Console.ReadLine());
  13.             char[] charArray = new char[] { a, b, c };
  14.             for (int i = 0; i < charArray.Length; i++)
  15.             {
  16.                 Array.Reverse(charArray);
  17.             }
  18.             Console.WriteLine(charArray);
  19.         }        
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement