Advertisement
butoff

Untitled

May 31st, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 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 RestaurantDiscount
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. bool suitable = true;
  14. double hallPrice = 2500d;
  15. string hall = "";
  16. int number = int.Parse(Console.ReadLine());
  17. string package = Console.ReadLine().ToLower();
  18. if (number<50)
  19. {
  20. hallPrice = 2500;
  21. hall = "Small Hall";
  22. }
  23. if (number > 50 && number < 100)
  24. {
  25. hallPrice = 5000;
  26. hall = "Terrace";
  27. }
  28. if (number > 100 && number < 120)
  29. {
  30. hallPrice = 7500;
  31. hall = "Great Hall";
  32. }
  33. if(number>120)
  34. {
  35. Console.WriteLine("We do not have an appropriate hall.");
  36. suitable = false;
  37. }
  38. if (suitable)
  39. {
  40. switch (package)
  41. {
  42. case "normal":
  43. hallPrice = (hallPrice + 500) * 0.95;
  44. break;
  45. case "gold":
  46. hallPrice = (hallPrice + 750) * 0.90;
  47. break;
  48. case "platinum":
  49. hallPrice = (hallPrice + 1000) * 0.85;
  50. break;
  51. }
  52. Console.WriteLine($"We can offer you the {hall}");
  53. Console.WriteLine("The price per person is {0:0.00}$", hallPrice / number);
  54. }
  55.  
  56. }
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement