elena1234

KnightsOfHonor- action and select

Jan 25th, 2021 (edited)
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace KnightsOfHonor
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             string[] names = Console.ReadLine().Split().Select(x=> "Sir "+ x).ToArray();
  11.             Action<string[]> actionPrint = x => Console.WriteLine(string.Join(Environment.NewLine, x));
  12.             actionPrint(names);        
  13.         }
  14.     }
  15. }
  16.  
Add Comment
Please, Sign In to add comment