Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace Smallest_of_Three_Numbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = int.Parse(Console.ReadLine());
- int b = int.Parse(Console.ReadLine());
- int c = int.Parse(Console.ReadLine());
- smallestNumber(a, b, c);
- }
- static void smallestNumber(int a, int b, int c)
- {
- if (a < b && a < c)
- {
- Console.WriteLine(a);
- }
- else if (b < a && b < c)
- {
- Console.WriteLine(b);
- }
- else if(c < b && c < a)
- {
- Console.WriteLine(c);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement