Advertisement
ralirp

Untitled

Jun 24th, 2017
301
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 _03_Reastaurant_Dicount_May_30
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var groupeSize = double.Parse(Console.ReadLine());
  14. string packageType = Console.ReadLine().ToLower().Trim();
  15.  
  16. var price = 0;
  17.  
  18. var hall = String.Empty;
  19. var discountpercent = 0.0;
  20.  
  21.  
  22. if (groupeSize <= 50)
  23. {
  24. hall = "Small Hall";
  25. price += 2500;
  26. }
  27. else if (groupeSize <= 100)
  28. {
  29. hall = "Terrace";
  30. price += 5000;
  31. }
  32. else if (groupeSize <= 120)
  33. {
  34. hall = "Great Hall";
  35. price += 7500;
  36. }
  37. if (packageType == "Normal")
  38. {
  39. discountpercent = 0.95;
  40. price += 500;
  41. }
  42. else if (packageType == "Gold")
  43. {
  44. discountpercent = 0.90;
  45. price += 750;
  46. }
  47. else if (packageType == "Platinum")
  48. {
  49. discountpercent = 0.85;
  50. price += 100;
  51. }
  52.  
  53.  
  54. if (groupeSize > 120)
  55. {
  56. Console.WriteLine("We do not have an appropriate hall.");
  57. }
  58. else
  59. {
  60. Console.WriteLine("We can offer you {0}.", hall);
  61.  
  62. Console.WriteLine("The price per person is {1:F2} $.", (price * discountpercent) / groupeSize);
  63. }
  64.  
  65.  
  66. }
  67. }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement