Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace methods_exerci
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = 0;
- Console.WriteLine(Smallest(number));
- }
- static int Smallest (int number)
- {
- int current = int.MaxValue;
- for (int i = 0; i < 3; i++)
- {
- number = int.Parse(Console.ReadLine());
- if (number < current)
- {
- current = number;
- }
- }
- return current;
- }
- }
- }
Add Comment
Please, Sign In to add comment