spasnikolov131

Untitled

May 21st, 2021
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.46 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. if (season == "Winter")
  15. {
  16. if (group == "boys")
  17. {
  18. decimal pricePerNights = countStudents * 9.60m * nights;
  19. price = pricePerNights;
  20. Console.WriteLine($"Judo {price:f2} lv.");
  21. }
  22. else if (group == "girls")
  23. {
  24. decimal pricePerNights = countStudents * 9.60m * nights;
  25. price = pricePerNights;
  26. Console.WriteLine($"Gymnastics {price:f2} lv.");
  27. }
  28. else if (group == "mixed")
  29. {
  30. decimal pricePerNights = countStudents * 10.00m * nights;
  31. price = pricePerNights;
  32. Console.WriteLine($"Ski {price:f2} lv.");
  33. }
  34. }
  35. else if (season == "Spring")
  36. {
  37. if (group == "boys" )
  38. {
  39. decimal pricePerNights = countStudents * 7.20m * nights;
  40. if (countStudents >= 20)
  41. {
  42. price = pricePerNights - (0.15m * pricePerNights);
  43. Console.WriteLine($"Tennis {price:f2} lv.");
  44. }
  45.  
  46. }
  47. else if (group == "girls")
  48. {
  49. if (countStudents >= 20)
  50. {
  51. decimal pricePerNights = countStudents * 7.20m * nights;
  52. price = pricePerNights - (0.15m * pricePerNights);
  53. Console.WriteLine($"Athletics {price:f2} lv.");
  54. }
  55. }
  56. if (group == "mixed")
  57. {
  58. decimal pricePerNights = countStudents * 9.50m * nights;
  59. if (countStudents >= 10 && countStudents <= 20)
  60. {
  61. price = pricePerNights - (0.05m * pricePerNights);
  62. }
  63. else
  64. {
  65. pricePerNights = price;
  66. }
  67. Console.WriteLine($"Cycling {price:f2} lv.");
  68.  
  69. }
  70. }
  71. if (season == "Summer")
  72. {
  73. if (group == "boys")
  74. {
  75. decimal pricePerNights = countStudents * 15m * nights;
  76. if (countStudents >= 50)
  77. {
  78. price = pricePerNights - (0.50m * pricePerNights);
  79. Console.WriteLine($"Football {price:f2} lv.");
  80. }
  81. }
  82. else if (group == "girls")
  83. {
  84. decimal pricePerNights = countStudents * 15m * nights;
  85. if (countStudents >= 20)
  86. {
  87. price = pricePerNights - (0.15m * pricePerNights);
  88. Console.WriteLine($"Volleyball {price:f2} lv.");
  89. }
  90. }
  91. }
  92.  
  93. }
  94. }
  95. }
Advertisement
Add Comment
Please, Sign In to add comment