Advertisement
desislava_topuzakova

Untitled

May 10th, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _06._Journey
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double budget = double.Parse(Console.ReadLine());
  10. string season = Console.ReadLine();
  11.  
  12. string whereWillStay = string.Empty;
  13. string destination = string.Empty;
  14.  
  15. switch (season)
  16. {
  17. case "summer":
  18. whereWillStay = "Camp";
  19. if (budget <= 100)
  20. {
  21. destination = "Bulgaria";
  22. budget *= 0.30;
  23. }
  24. else if (budget <= 1000)
  25. {
  26. destination = "Balkans";
  27. budget *= 0.40;
  28. }
  29. else
  30. {
  31. whereWillStay = "Hotel";
  32. destination = "Europe";
  33. budget *= 0.90;
  34. }
  35. break;
  36. case "winter":
  37. whereWillStay = "Hotel";
  38. if (budget <= 100)
  39. {
  40. destination = "Bulgaria";
  41. budget *= 0.70;
  42. }
  43. else if (budget <= 1000)
  44. {
  45. destination = "Balkans";
  46. budget *= 0.80;
  47. }
  48. else
  49. {
  50. destination = "Europe";
  51. budget *= 0.90;
  52. }
  53. break;
  54. }
  55. Console.WriteLine($"Somewhere in {destination}");
  56. Console.WriteLine($"{whereWillStay} - {budget:F2}");
  57. }
  58. }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement