Advertisement
KirillKorobka

Untitled

Nov 15th, 2019
115
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. Console.WriteLine("Enter number2");
  12. float b = float.Parse(Console.ReadLine());
  13. Console.WriteLine("Enter number3");
  14. float c = float.Parse(Console.ReadLine());
  15.  
  16. if (a <= b && b <= c)
  17. {
  18. Console.WriteLine(c);
  19. }
  20. else if (a < b && b > c)
  21. {
  22. Console.WriteLine(b);
  23. }
  24. else if (a >= b && b < c)
  25. {
  26. Console.WriteLine(a);
  27. }
  28. else if (a > b && b >c )
  29. {
  30. Console.WriteLine(a);
  31. }
  32. else if (a < b && b > c)
  33. {
  34. Console.WriteLine(a);
  35. }
  36. else if (a > b && b < c)
  37. {
  38. Console.WriteLine(a);
  39. }
  40. else
  41. {
  42. Console.WriteLine();
  43. }
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement