Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp7
- {
- class Program
- {
- static void Main(string[] args)
- {
- int firstNum = int.Parse(Console.ReadLine());
- int secNum = int.Parse(Console.ReadLine());
- int thirdNum = int.Parse(Console.ReadLine());
- Console.WriteLine(SmallestNumber(firstNum, secNum, thirdNum));
- }
- static int SmallestNumber(int firstNum, int secNum, int thirdNum)
- {
- if (firstNum < secNum && firstNum < thirdNum)
- {
- return firstNum;
- }
- else if (secNum < firstNum && secNum < thirdNum)
- {
- return secNum;
- }
- else
- {
- return thirdNum;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement