Advertisement
Guest User

Problem 4. Hotel

a guest
Sep 25th, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.40 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace _03.RestaurantDiscount
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. string month = Console.ReadLine();
  12. int nights = int.Parse(Console.ReadLine());
  13. if (month=="May"&&nights>7)
  14. {
  15. Console.WriteLine($"Studio: {(nights*50*0.95):f2} lv.");
  16. Console.WriteLine($"Double: {(nights * 65):f2} lv.");
  17. Console.WriteLine($"Suite: {(nights*75):f2} lv.");
  18. }
  19. else if (month=="May"&&nights<7)
  20. {
  21. Console.WriteLine($"Studio: {(nights*50):f2} lv.");
  22. Console.WriteLine($"Double: {(nights * 65):f2} lv.");
  23. Console.WriteLine($"Suite: {(nights * 75):f2} lv.");
  24. }
  25. else if (month=="October"&&nights>7)
  26. {
  27. Console.WriteLine($"Studio: {(nights * 50 * 0.95):f2} lv.");
  28. Console.WriteLine($"Double: {(nights * 65):f2} lv.");
  29. Console.WriteLine($"Suite: {(nights * 75):f2} lv.");
  30. }
  31. else if (month == "October" && nights < 7)
  32. {
  33. Console.WriteLine($"Studio: {(nights * 50 ):f2} lv.");
  34. Console.WriteLine($"Double: {(nights * 65 ):f2} lv.");
  35. Console.WriteLine($"Suite: {(nights * 75 ):f2} lv.");
  36. }
  37. else if (month=="June"&&nights>14)
  38. {
  39. Console.WriteLine($"Studio: {(nights*60)} lv.");
  40. Console.WriteLine($"Double: {(nights * 72*0.1)} lv.");
  41. Console.WriteLine($"Suite: {(nights * 82):f2} lv.");
  42. }
  43. else if (month == "June" && nights < 14)
  44. {
  45. Console.WriteLine($"Studio: {(nights * 60):f2} lv.");
  46. Console.WriteLine($"Double: {(nights * 72 ):f2} lv.");
  47. Console.WriteLine($"Suite: {(nights * 82):f2} lv.");
  48. }
  49. else if (month == "September" && nights < 14)
  50. {
  51. Console.WriteLine($"Studio: {(nights * 60-60):f2} lv.");
  52. Console.WriteLine($"Double: {(nights * 72):f2} lv.");
  53. Console.WriteLine($"Suite: {(nights * 82):f2} lv.");
  54. }
  55. else if (month == "September" && nights >14)
  56. {
  57. Console.WriteLine($"Studio: {(nights * 60):f2} lv.");
  58. Console.WriteLine($"Double: {(nights * 72*0.1 ):f2} lv.");
  59. Console.WriteLine($"Suite: {(nights * 82):f2} lv.");
  60. }
  61. else if (month == "July" && nights > 14)
  62. {
  63. Console.WriteLine($"Studio: {(nights * 68):f2} lv.");
  64. Console.WriteLine($"Double: {(nights * 77):f2} lv.");
  65. Console.WriteLine($"Suite: {(nights * 89 ):f2} lv.");
  66. }
  67. else if (month == "July" && nights < 14)
  68. {
  69. Console.WriteLine($"Studio: {(nights * 68 ):f2} lv.");
  70. Console.WriteLine($"Double: {(nights * 77):f2} lv.");
  71. Console.WriteLine($"Suite: {(nights * 89):f2} lv.");
  72. }
  73.  
  74. else if (month == "August" && nights > 14)
  75. {
  76. Console.WriteLine($"Studio: {(nights * 68):f2} lv.");
  77. Console.WriteLine($"Double: {(nights * 77):f2} lv.");
  78. Console.WriteLine($"Suite: {(nights * 89*0.15):f2} lv.");
  79. }
  80. else if (month == "August" && nights < 14)
  81. {
  82. Console.WriteLine($"Studio: {(nights * 68):f2} lv.");
  83. Console.WriteLine($"Double: {(nights * 77):f2} lv.");
  84. Console.WriteLine($"Suite: {(nights * 89):f2} lv.");
  85. }
  86. else if (month == "December" && nights > 14)
  87. {
  88. Console.WriteLine($"Studio: {(nights * 68):f2} lv.");
  89. Console.WriteLine($"Double: {(nights * 77):f2} lv.");
  90. Console.WriteLine($"Suite: {(nights * 89):f2} lv.");
  91. }
  92. else if (month == "December" && nights < 14)
  93. {
  94. Console.WriteLine($"Studio: {(nights * 68):f2} lv.");
  95. Console.WriteLine($"Double: {(nights * 77)} lv.");
  96. Console.WriteLine($"Suite: {(nights * 89):f2} lv.");
  97. }
  98.  
  99. }
  100. }
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement