SHARE
TWEET

Functional Programming - 03. Custom Min Function

gabi11 May 26th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
  11.     class Program
  12.     {
  13.         static void Main(string[] args)
  14.         {
  15.             Func<int[], int> minNumber = n => n.Min();
  16.  
  17.             Console.WriteLine(minNumber(Console.ReadLine()
  18.                 .Split()
  19.                 .Select(int.Parse)
  20.                 .ToArray()));
  21.         }
  22.     }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top