Advertisement
YavorJS

Trip

Jul 3rd, 2016
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Trip
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double budget = double.Parse(Console.ReadLine());
  14. var season = Console.ReadLine();
  15. var destination = "";
  16. destination = destination;
  17. double cost = 0.0;
  18. var CampOrHotel = "";
  19.  
  20. if (budget<=100)
  21. {
  22. destination = "Bulgaria";
  23. if (season == "summer")
  24. {
  25. cost = budget * 30 / 100;
  26. CampOrHotel = "Camp";
  27. }
  28. else if (season == "winter")
  29. {
  30. cost = budget * 70 / 100;
  31. CampOrHotel = "Hotel";
  32. }
  33. }
  34. else if(budget>100 && budget <= 1000)
  35. {
  36. destination = "Balkans";
  37. if (season == "summer")
  38. {
  39. cost = budget * 40 / 100;
  40. CampOrHotel = "Camp";
  41. }
  42. else if (season == "winter")
  43. {
  44. cost = budget * 80 / 100;
  45. CampOrHotel = "Hotel";
  46. }
  47. }
  48. else if (budget > 1000)
  49. {
  50. destination = "Europe";
  51. cost = budget * 90 / 100;
  52. CampOrHotel = "Hotel";
  53. }
  54. Console.WriteLine("Somewhere in "+ destination);
  55. Console.WriteLine("{0} - {1:f2}",CampOrHotel, cost);
  56.  
  57.  
  58. }
  59. }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement