Advertisement
dosseva

01_SmalestNum

Apr 10th, 2021
738
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _01_Smalest_Num
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int first = int.Parse(Console.ReadLine());
  10.             int second = int.Parse(Console.ReadLine());
  11.             int thirth = int.Parse(Console.ReadLine());
  12.  
  13.             int min = SmallestNum(first, second, thirth);
  14.  
  15.             Console.WriteLine(min);
  16.         }
  17.         public static int SmallestNum(int first, int second, int thirth)
  18.         {
  19.             int min = Math.Min(
  20.                 Math.Min(first, second),
  21.                 thirth);
  22.  
  23.             return min;
  24.         }
  25.  
  26.     }
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement