Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ArrangeIntegers
- {
- using System;
- using System.Linq;
- public class ArrangeIntegersMain
- {
- private static readonly string[] IntegerNames = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" };
- public static void Main()
- {
- Console.WriteLine(string.Join(", ", Console.ReadLine()
- .Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries)
- .OrderBy(str => string.Join(string.Empty, str.Select(ch => IntegerNames[ch - '0'])))));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment