Advertisement
spasnikolov131

Untitled

Jul 16th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. using System;
  2.  
  3. namespace 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().ToLower();
  11. string destination = string.Empty;
  12. double spentMoney = 0.0;
  13.  
  14. if (budget <= 100)
  15. {
  16. if (season == "summer") ;
  17. {
  18. spentMoney = 0.3 * budget;
  19. Console.WriteLine("Somewhere in Bulgaria");
  20. Console.WriteLine($"Camp - {spentMoney:f2}");
  21. }
  22. else if (season == "winter") ;
  23. {
  24. spentMoney = 0.7 * budget;
  25. Console.WriteLine("Somewhere in Bulgaria");
  26. Console.WriteLine($"Hotel - {spentMoney:f2}");
  27. }
  28. }
  29.  
  30. if (budget <= 1000)
  31. {
  32. if (season == "summer")
  33. {
  34. spentMoney = 0.40 * budget;
  35. Console.WriteLine("Somewhere in Balkans");
  36. Console.WriteLine($"Camp - {spentMoney:f2}");
  37. }
  38. else if (season == "winter") ;
  39. {
  40. spentMoney = 0.80 * budget;
  41. Console.WriteLine("Somewhere in Balkans");
  42. Console.WriteLine($"Hotel - {spentMoney:f2}");
  43. }
  44. }
  45. if (budget > 1000)
  46. {
  47. if (season == "summer" || season == "winter") ;
  48. {
  49. spentMoney = 0.9 * budget;
  50. Console.WriteLine("Somewhere in Europe");
  51. Console.WriteLine($"Hotel - {spentMoney:f2}");
  52. }
  53. }
  54.  
  55. }
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement