IPetrov007

MinMetod

Feb 1st, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _02_MinMethod
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int a = int.Parse(Console.ReadLine());
  14. int b = int.Parse(Console.ReadLine());
  15.  
  16. int result = GetMin(a, b);
  17.  
  18. int c = int.Parse(Console.ReadLine());
  19.  
  20. int newResult = GetMin(result, c);
  21.  
  22. Console.WriteLine(newResult);
  23. }
  24.  
  25. static int GetMin(int a, int b)
  26. {
  27. if (a < b)
  28. {
  29. return a;
  30. }
  31. else
  32. {
  33. return b;
  34. }
  35. }
  36. }
  37. }
Add Comment
Please, Sign In to add comment