Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- string numberAsString = Console.ReadLine();
- var result = new string(numberAsString.Select((ch, index) => new { ch, index })
- .OrderByDescending(x => x.index)
- .Select(x => x.ch)
- .ToArray());
- Console.WriteLine(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement