Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace Exam_Shopping
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] arr = Console.ReadLine().ToLower().Split(new char[] {'.', ',', ':', ';', '(', ')', '[', ']', '\"', '\'', '\\', '/', '!', '?', ' '}, StringSplitOptions.RemoveEmptyEntries).ToArray();
- arr = arr.Where(a => a.Length < 5).Distinct().ToArray();
- arr = arr.OrderBy(x => x).ToArray();
- Console.WriteLine(string.Join(", ", arr));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement