Advertisement
elena1234

WordFilter

Oct 25th, 2020
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. namespace WordFilter
  6. {
  7.     class MainClass
  8.     {
  9.         public static void Main()
  10.         {
  11.             List<string> words = Console.ReadLine().Split().ToList();
  12.             var filteredList = words.Where(x => x.Length % 2 == 0).ToList();
  13.  
  14.             foreach (var item in filteredList)
  15.             {
  16.                 Console.WriteLine(item);
  17.             }
  18.         }
  19.     }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement