Advertisement
KirillKorobka

Untitled

Nov 15th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. using System;
  2.  
  3. namespace itvdnCourse
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. Console.WriteLine("Enter number1");
  10. float a = float.Parse(Console.ReadLine());
  11.  
  12. Console.WriteLine("Enter number2");
  13. float b = float.Parse(Console.ReadLine());
  14.  
  15. Console.WriteLine("Enter number3");
  16. float c = float.Parse(Console.ReadLine());
  17.  
  18. if (a <= b && b <= c)
  19. {
  20. Console.WriteLine(c);
  21. }
  22. else if (a <= b && b >= c)
  23. {
  24. Console.WriteLine(b);
  25. }
  26. else if (a >= b && b <= c)
  27. {
  28. Console.WriteLine(a);
  29. }
  30. else if (a >= b && b >= c )
  31. {
  32. Console.WriteLine(a);
  33. }
  34. else if (a <= b && b >= c)
  35. {
  36. Console.WriteLine(a);
  37. }
  38. else if (a >= b && b <= c)
  39. {
  40. Console.WriteLine(a);
  41. }
  42. else
  43. {
  44. Console.WriteLine();
  45. }
  46. }
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement