Advertisement
gabi11

Functional Programming - 3. Count Uppercase Words

May 25th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6.  
  7.  
  8. namespace CSharpAdvanced
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             Console.ReadLine()
  15.                 .Split(' ', StringSplitOptions.RemoveEmptyEntries)
  16.                 .Where(w => char.IsUpper(w[0]))
  17.                 .ToList()
  18.                 .ForEach(Console.WriteLine);
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement