Advertisement
pavsavov

03.Restaurant

May 30th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.18 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 _30._05___Excercise___Cond.Loops
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var groupSize = int.Parse(Console.ReadLine());
  14. var package = Console.ReadLine();
  15.  
  16. if (0 < groupSize && groupSize <= 50)
  17. {
  18. Console.WriteLine("We can offer you the Small Hall");
  19. if (package.Equals("Normal"))
  20. {
  21. var pricePerPerson = (3000 - ((2500 + 500) * 0.05)) / groupSize;
  22. Console.WriteLine($"The price per person is {pricePerPerson:F2}$");
  23. }
  24. else if (package.Equals("Gold"))
  25. {
  26. var pricePerPerson = (3250 - ((2500 + 750) * 0.10)) / groupSize;
  27. Console.WriteLine($"The price per person is {pricePerPerson:F2}$");
  28. }
  29. else
  30. {
  31. var pricePerPerson = (3500 - ((2500 + 1000) * 0.15)) / groupSize;
  32. Console.WriteLine($"The price per person is {pricePerPerson:F2}$");
  33. }
  34. }
  35. else if (50 < groupSize && groupSize <= 100)
  36. {
  37. Console.WriteLine("We can offer you the Terrace");
  38. if (package.Equals("Normal"))
  39. {
  40. var pricePerPerson = (5500 - ((5000 + 500) * 0.05)) / groupSize;
  41. Console.WriteLine($"The price per person is {pricePerPerson:F2}$");
  42. }
  43. else if (package.Equals("Gold"))
  44. {
  45. var pricePerPerson = (3750 - ((5000 + 750) * 0.10)) / groupSize;
  46. Console.WriteLine($"The price per person is {pricePerPerson:F2}$");
  47. }
  48. else
  49. {
  50. var pricePerPerson = (6000 - ((5000 + 1000) * 0.15)) / groupSize;
  51. Console.WriteLine($"The price per person is {pricePerPerson:F2}$");
  52. }
  53. }
  54. else if (100 < groupSize && groupSize <= 120)
  55. {
  56. Console.WriteLine("We can offer you the Great Hall");
  57. if (package.Equals("Normal"))
  58. {
  59. var pricePerPerson = (8000 - ((7500 + 500) * 0.05)) / groupSize;
  60. Console.WriteLine($"The price per person is {pricePerPerson:F2}$");
  61. }
  62. else if (package.Equals("Gold"))
  63. {
  64. var pricePerPerson = (8250 - ((7500 + 750) * 0.10)) / groupSize;
  65. Console.WriteLine($"The price per person is {pricePerPerson:F2}$");
  66. }
  67. else
  68. {
  69. var pricePerPerson = (8500 - ((7500 + 1000) * 0.15)) / groupSize;
  70. Console.WriteLine($"The price per person is {pricePerPerson:F2}$");
  71. }
  72. }
  73. else
  74. {
  75. Console.WriteLine("We do not have an appropriate hall.");
  76. }
  77. }
  78. }
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement