silvana1303

reverse string

Sep 19th, 2020 (edited)
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. namespace advanced
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             /*string[] input = Console.ReadLine().Split().ToArray();
  12.  
  13.             Stack<string> words = new Stack<string>(input);
  14.  
  15.             Console.WriteLine(string.Join(" ", words));*/
  16.  
  17.             string input = Console.ReadLine();
  18.  
  19.             Stack<char> words = new Stack<char>(input);
  20.  
  21.             Console.WriteLine(string.Join("", words));
  22.         }
  23.     }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment