MiroslavKisov

KnightsOfHonor

Feb 2nd, 2018
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace KnightsOfHonor
  5. {
  6.     public class StartUp
  7.     {
  8.         public static void Main()
  9.         {
  10.             var names = Console.ReadLine()
  11.                 .Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries).ToArray();
  12.             Action<string> appendSir = message => Console.WriteLine("Sir " + message);
  13.             for (int i = 0; i < names.Length; i++)
  14.             {
  15.                 appendSir(names[i]);
  16.             }
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment