MiroslavKisov

ActionPrint

Feb 2nd, 2018
152
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 ActionPrint
  5. {
  6.     public class StartUp
  7.     {
  8.         public static void Main(string[] args)
  9.         {
  10.             var input = Console.ReadLine()
  11.                 .Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries).ToArray();
  12.             Action<string> printMsg = message => Console.WriteLine(message);
  13.             for (int i = 0; i < input.Length; i++)
  14.             {
  15.                 printMsg(input[i]);
  16.             }
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment