Advertisement
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 GerryTutor
- {
- class Program
- {
- static void Main(string[] args)
- {
- string text = Console.ReadLine();
- Stack<char> stack = new Stack<char>();
- foreach (char ch in text)
- {
- stack.Push(ch);
- }
- while (stack.Count != 0)
- {
- Console.Write(stack.Pop());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement