naskodaskalov

Problem 03 - Travelling

Mar 27th, 2016
1,013
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. using System;
  2. class Traveling
  3. {
  4. static void Main()
  5. {
  6. var budget = double.Parse(Console.ReadLine());
  7. var season = Console.ReadLine();
  8. var price = 0.0;
  9. string destination;
  10.  
  11. if (budget <= 100)
  12. {
  13.  
  14. if (season == "summer")
  15. {
  16. price = budget * 0.3;
  17. Console.WriteLine("Somewhere in Bulgaria");
  18. Console.WriteLine("Camp - {0:F2}", price);
  19.  
  20. } else if (season == "winter")
  21. {
  22. price = budget * 0.7;
  23. Console.WriteLine("Somewhere in Bulgaria");
  24. Console.WriteLine("Hotel - {0:F2}", price);
  25. }
  26.  
  27. } else if (budget <= 1000)
  28. {
  29.  
  30. if (season == "summer")
  31. {
  32. price = budget * 0.4;
  33. Console.WriteLine("Somewhere in Balkans");
  34. Console.WriteLine("Camp - {0:F2}", price);
  35. }
  36. else if (season == "winter")
  37. {
  38. price = budget * 0.8;
  39. Console.WriteLine("Somewhere in Balkans");
  40. Console.WriteLine("Hotel - {0:F2}", price);
  41. }
  42.  
  43. } else if (budget > 1000)
  44. {
  45. price = budget * 0.9;
  46. Console.WriteLine("Somewhere in Europe");
  47. Console.WriteLine("Hotel - {0:F2}", price);
  48. }
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment