Advertisement
Dikov

Untitled

Oct 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _01.smalletsThreeNumbers
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int a = int.Parse(Console.ReadLine());
  10. int b = int.Parse(Console.ReadLine());
  11. int c = int.Parse(Console.ReadLine());
  12. GettheSmallestInteger(a,b,c);
  13. }
  14.  
  15. private static void GettheSmallestInteger(int a, int b, int c)
  16. {
  17. if (a > b && b < c)
  18. {
  19. Console.WriteLine(b);
  20. }
  21. else if (b > a && a < c)
  22. {
  23. Console.WriteLine(a);
  24. }
  25. else if (a > c && c < b)
  26. {
  27. Console.WriteLine(c);
  28. }
  29. else
  30. {
  31. Console.WriteLine(a);
  32. }
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement