Guest User

Untitled

a guest
Feb 6th, 2020
217
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace Smallest_of_Three_Numbers
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. int a = int.Parse(Console.ReadLine());
  11. int b = int.Parse(Console.ReadLine());
  12. int c = int.Parse(Console.ReadLine());
  13. smallestNumber(a, b, c);
  14. }
  15. static void smallestNumber(int a, int b, int c)
  16. {
  17.  
  18.  
  19. if (a < b && a < c)
  20. {
  21. Console.WriteLine(a);
  22. }
  23. else if (b < a && b < c)
  24. {
  25. Console.WriteLine(b);
  26. }
  27. else if(c < b && c < a)
  28. {
  29. Console.WriteLine(c);
  30. }
  31.  
  32. }
  33.  
  34. }
  35.  
  36. }
RAW Paste Data