TheBulgarianWolf

Word Filter

Feb 20th, 2021
985
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace WordFilter
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             Console.WriteLine("Enter the words here: ");
  11.             string[] words = Console.ReadLine().Split().Where(w => w.Length % 2 == 0).ToArray();
  12.             foreach(string word in words)
  13.             {
  14.                 Console.WriteLine(word);
  15.             }
  16.         }
  17.     }
  18. }
  19.  
Add Comment
Please, Sign In to add comment