Advertisement
spasnikolov131

Untitled

May 21st, 2021
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. using System;
  2.  
  3. namespace School_Camp
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string season = Console.ReadLine();
  10. string group = Console.ReadLine();
  11. int countStudents = int.Parse(Console.ReadLine());
  12. int nights = int.Parse(Console.ReadLine());
  13. decimal price = 0;
  14. decimal pricePerNights = 0;
  15. string sport = "";
  16.  
  17. if (season == "Winter")
  18. {
  19. if (group == "boys")
  20. {
  21. pricePerNights = countStudents * 9.60m * nights;
  22. price = pricePerNights;
  23. sport = "Judo";
  24.  
  25. }
  26. else if (group == "girls")
  27. {
  28. pricePerNights = countStudents * 9.60m * nights;
  29. price = pricePerNights;
  30. sport = "Gymnastics";
  31. }
  32. else if (group == "mixed")
  33. {
  34. pricePerNights = countStudents * 10.00m * nights;
  35. price = pricePerNights;
  36. sport = "Ski";
  37. }
  38. }
  39. else if (season == "Spring")
  40. {
  41. if (group == "boys")
  42. {
  43. pricePerNights = countStudents * 7.20m * nights;
  44. if (countStudents >= 20)
  45. {
  46. price = pricePerNights - (0.15m * pricePerNights);
  47. sport = "Tennis";
  48. }
  49.  
  50. }
  51. else if (group == "girls")
  52. {
  53.  
  54. pricePerNights = countStudents * 7.20m * nights;
  55. price = pricePerNights - (0.15m * pricePerNights);
  56. sport = "Athletics";
  57.  
  58. }
  59. if (group == "mixed")
  60. {
  61. pricePerNights = countStudents * 9.50m * nights;
  62.  
  63. price = pricePerNights - (0.05m * pricePerNights);
  64.  
  65. sport = "Cycling";
  66.  
  67. }
  68. }
  69. if (season == "Summer")
  70. {
  71. if (group == "boys")
  72. {
  73. pricePerNights = countStudents * 15m * nights;
  74. if (countStudents >= 50)
  75. {
  76. price = pricePerNights - (0.50m * pricePerNights);
  77. sport = "Football";
  78. }
  79. }
  80. else if (group == "girls")
  81. {
  82. pricePerNights = countStudents * 15m * nights;
  83.  
  84. price = pricePerNights - (0.15m * pricePerNights);
  85. sport = "Volleyball";
  86.  
  87. }
  88. }
  89. if (countStudents >= 50)
  90. {
  91. price = pricePerNights - (0.50m * pricePerNights);
  92. }
  93. else if (countStudents >= 20 && countStudents < 50)
  94. {
  95. price = pricePerNights - (0.15m * pricePerNights);
  96. }
  97. else if (countStudents >= 10 && countStudents < 20)
  98. {
  99. price = pricePerNights - (0.05m * pricePerNights);
  100. }
  101. Console.WriteLine($"{sport} {price:f2} lv.");
  102. }
  103. }
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement