Advertisement
Guest User

Untitled

a guest
Oct 27th, 2019
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Hotel_Room
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9.  
  10.  
  11. string mount = Console.ReadLine();
  12. int nights = int.Parse(Console.ReadLine());
  13.  
  14. double price = 00.00;
  15. double TotalPrice = 0.00;
  16. string type = "";
  17.  
  18.  
  19.  
  20. if (mount == "May" || mount == "October" && type == "Apartment")
  21. {
  22.  
  23. if (nights > 14)
  24. {
  25. price = 65.00;
  26. TotalPrice = (price * nights) * 0.90;
  27. }
  28. Console.WriteLine($"Apartment: {TotalPrice:F2} lv.");
  29. }
  30. if (mount == "May"|| mount == "October" && type == "Studio")
  31. {
  32. if (nights > 7 && nights <= 14)
  33. {
  34. price = 50.00;
  35. TotalPrice = (price * nights) * 0.95;
  36. }
  37. if (nights > 14)
  38. {
  39. price = 50.00;
  40. TotalPrice = (price * nights) * 0.70;
  41. }
  42. Console.WriteLine($"Studio: {TotalPrice:F2} lv.");
  43. }
  44.  
  45. if (mount == "August" || mount == "July" && type == "Apartment")
  46. {
  47. price = 77.00;
  48. TotalPrice = price * nights;
  49. if (nights > 14)
  50. {
  51. price = 77.00;
  52. TotalPrice = (price * nights) * 0.90;
  53. }
  54. Console.WriteLine($"Apartment: {TotalPrice:F2} lv.");
  55.  
  56.  
  57. if (mount == "August" || mount == "July" && type == "Apartment")
  58. {
  59. price = 76.00;
  60. TotalPrice = (price * nights);
  61.  
  62. Console.WriteLine($"Studio: {TotalPrice:F2} lv.");
  63. }
  64. }
  65.  
  66. if (mount == "June" || mount == "September" && type == "Apartment")
  67. {
  68. price = 68.70;
  69. TotalPrice = price * nights;
  70. if (nights > 14)
  71. {
  72. price = 68.70;
  73. TotalPrice = (price * nights) * 0.90;
  74. }
  75. Console.WriteLine($"Apartment: {TotalPrice:F2} lv.");
  76.  
  77.  
  78. if (mount == "June" || mount == "September" && type == "Studio")
  79. {
  80. price = 75.20;
  81. TotalPrice = (price * nights);
  82. if (nights > 14)
  83. {
  84. price = 75.20;
  85. TotalPrice = (price * nights) * 0.80;
  86. }
  87. Console.WriteLine($"Studio: {TotalPrice:F2} lv.");
  88. }
  89. }
  90.  
  91.  
  92. }
  93. }
  94. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement