Advertisement
spasnikolov131

Untitled

May 21st, 2021
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 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. else if (group == "girls")
  46. {
  47. if (countStudents >= 20)
  48. {
  49. price = pricePerNights - (0.15m * pricePerNights);
  50. Console.WriteLine($"Athletics {price:f2} lv.");
  51. }
  52. }
  53. }
  54. if (group == "mixed")
  55. {
  56. decimal pricePerNights = countStudents * 9.50m * nights;
  57. if (countStudents >= 10 && countStudents <= 20)
  58. {
  59. price = pricePerNights - (0.05m * pricePerNights);
  60. }
  61. else
  62. {
  63. pricePerNights = price;
  64. }
  65. Console.WriteLine($"Cycling {price:f2} lv.");
  66.  
  67. }
  68. }
  69. if (season == "Summer")
  70. {
  71. if (group == "boys")
  72. {
  73. decimal pricePerNights = countStudents * 15m * nights;
  74. if (countStudents >= 50)
  75. {
  76. price = pricePerNights - (0.50m * pricePerNights);
  77. Console.WriteLine($"Football {price:f2} lv.");
  78. }
  79. }
  80. else if (group == "girls")
  81. {
  82. decimal pricePerNights = countStudents * 15m * nights;
  83. if (countStudents >= 20)
  84. {
  85. price = pricePerNights - (0.15m * pricePerNights);
  86. Console.WriteLine($"Volleyball {price:f2} lv.");
  87. }
  88. }
  89. }
  90.  
  91. }
  92. }
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement