VelizarAvramov

09. Reversed chars

Nov 28th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _09._Reversed_chars
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //char a = char.Parse(Console.ReadLine());
  10.             //char b = char.Parse(Console.ReadLine());
  11.             //char c = char.Parse(Console.ReadLine());
  12.  
  13.             //Console.WriteLine($"{c}{b}{a}");
  14.  
  15.             char[] array = new char[3];
  16.  
  17.             for (int i = 0; i < array.Length; i++)
  18.             {
  19.                 array[i] = char.Parse(Console.ReadLine());
  20.             }
  21.             Array.Reverse(array);
  22.             string result = new string(array);
  23.             Console.WriteLine(result);
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment