Advertisement
Spocoman

04. Word Filter

Apr 8th, 2023
681
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 WordSynonyms
  6. {
  7.     class Program
  8.     {
  9.         public static void Main()
  10.         {
  11.             List<string> words = Console.ReadLine()
  12.                 .Split(" ")
  13.                 .Where(x => x.Length % 2 == 0)
  14.                 .ToList();
  15.             foreach (string word in words)
  16.             {
  17.                 Console.WriteLine(word);
  18.             }
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement