Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _03RestaurantDiscount
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var count = int.Parse(Console.ReadLine());
  14. var package = Console.ReadLine();
  15. string hall ="" ;
  16. var hallPrice = 0.00;
  17. var packagePrice = 0.00;
  18. var totalPrice = 0.00;
  19. var pricePerPerson = 0.00;
  20.  
  21.  
  22. if (count <=50)
  23. {
  24. hall = "Small Hall";
  25. hallPrice = 2500;
  26. if (package == "Normal")
  27. {
  28. packagePrice = 500;
  29. totalPrice = (hallPrice + packagePrice) - 0.05 * (hallPrice + packagePrice);
  30. pricePerPerson = totalPrice / count;
  31. }
  32. else if (package == "Gold")
  33. {
  34. packagePrice = 750;
  35. totalPrice = (hallPrice + packagePrice) - 0.1 * (hallPrice + packagePrice);
  36. pricePerPerson = totalPrice / count;
  37. }
  38. else if (package == "Platinium")
  39. {
  40. packagePrice = 1000;
  41. totalPrice = (hallPrice + packagePrice) - 0.15 * (hallPrice + packagePrice);
  42. pricePerPerson = totalPrice / count;
  43. }
  44. Console.WriteLine("We can offer you the {0}", hall);
  45. Console.WriteLine("The price per person is {0:f2}$", pricePerPerson);
  46.  
  47. }
  48. else if (count>50 && count <=100)
  49. {
  50. hall = "Terrace";
  51. hallPrice = 5000;
  52. if (package == "Normal")
  53. {
  54. packagePrice = 500;
  55. totalPrice = (hallPrice + packagePrice) - 0.05 * (hallPrice + packagePrice);
  56. pricePerPerson = totalPrice / count;
  57. }
  58. else if (package == "Gold")
  59. {
  60. packagePrice = 750;
  61. totalPrice = (hallPrice + packagePrice) - 0.1 * (hallPrice + packagePrice);
  62. pricePerPerson = totalPrice / count;
  63. }
  64. else if (package == "Platinium")
  65. {
  66. packagePrice = 1000;
  67. totalPrice = (hallPrice + packagePrice) - 0.15 * (hallPrice + packagePrice);
  68. pricePerPerson = totalPrice / count;
  69. }
  70. Console.WriteLine("We can offer you the {0}", hall);
  71. Console.WriteLine("The price per person is {0:f2}$", pricePerPerson);
  72. }
  73. else if (count > 100 && count <=120)
  74. {
  75. hall = "Great Hall";
  76. hallPrice = 7500;
  77. if (package == "Normal")
  78. {
  79. packagePrice = 500;
  80. totalPrice = (hallPrice + packagePrice) - 0.05 * (hallPrice + packagePrice);
  81. pricePerPerson = totalPrice / count;
  82. }
  83. else if (package == "Gold")
  84. {
  85. packagePrice = 750;
  86. totalPrice = (hallPrice + packagePrice) - 0.1* (hallPrice + packagePrice);
  87. pricePerPerson = totalPrice / count;
  88. }
  89. else if (package == "Platinum")
  90. {
  91. packagePrice = 1000;
  92. totalPrice = (hallPrice + packagePrice) - 0.15* (hallPrice + packagePrice);
  93. pricePerPerson = totalPrice / count;
  94. }
  95. Console.WriteLine("We can offer you the {0}", hall);
  96. Console.WriteLine("The price per person is {0:f2}$", pricePerPerson);
  97.  
  98. }
  99. else if ( count > 120)
  100. {
  101. Console.WriteLine("We do not have an appropriate hall.");
  102. }
  103.  
  104.  
  105. }
  106. }
  107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement