SHARE
TWEET

Untitled

a guest Oct 18th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace smallestOfThreeNumber
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int firstNumber = int.Parse(Console.ReadLine());
  10.             int secondNumber = int.Parse(Console.ReadLine());
  11.             int thirdNumber = int.Parse(Console.ReadLine());
  12.             Console.WriteLine(GetSmallestNumber(firstNumber, secondNumber, thirdNumber));
  13.         }
  14.  
  15.         static int GetSmallestNumber(int firstNum, int secondNum, int thirdNum)
  16.         {
  17.             int minNumber = Math.Min(Math.Min(secondNum, thirdNum), firstNum);
  18.             return minNumber;
  19.         }
  20.     }
  21. }
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