Advertisement
fbinnzhivko

9.00 Capitalization

Jun 8th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. class Capitalization
  5. {
  6.     static void Main()
  7.     {
  8.         List<string> words = Console.ReadLine()
  9.             .Split(new char[] { ' ' }
  10.             , StringSplitOptions.RemoveEmptyEntries)
  11.             .Select(w => w[0].ToString().ToUpper()
  12.             + w.Substring(1, w.Length - 1))
  13.             .ToList();
  14.  
  15.         Console.WriteLine(string.Join(" ", words));
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement