Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- using System.Numerics;
- using System.Text;
- namespace exampreparation
- {
- class exam
- {
- static void Main(string[] args)
- {
- int input1 = int.Parse(Console.ReadLine());
- int input2 = int.Parse(Console.ReadLine());
- int input3 = int.Parse(Console.ReadLine());
- int smallest = Smallest(input1, input2, input3);
- Console.WriteLine(smallest);
- }
- static int Smallest(int input1, int input2, int input3)
- {
- int smallest = 0;
- if (input1 < input2 && input1 < input3)
- {
- smallest = input1;
- }
- else if (input2 < input1 && input2 < input3)
- {
- smallest = input2;
- }
- else
- {
- smallest = input3;
- }
- return smallest;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement