Advertisement
gabi11

Functional Programming - 03. Custom Min Function

May 26th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement