Advertisement
Tanina80

16

Jul 3rd, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Trip
  4. {
  5. class Trip
  6. {
  7. static void Main(string[] args)
  8. {
  9. decimal euro = decimal.Parse(Console.ReadLine());
  10. var season = Console.ReadLine();
  11.  
  12. decimal suma = 0.0m;
  13.  
  14.  
  15.  
  16. if (season == "summer")
  17. {
  18. if (euro >= 10 && euro <= 100)
  19. {
  20. suma = euro * 0.3;
  21. Console.WriteLine("Somewhere in Bulgaria");
  22. Console.WriteLine("Camp - {0:f2}", suma);
  23.  
  24. }
  25.  
  26. else if (euro > 100 && euro <= 1000)
  27. {
  28. suma = euro * 0.4;
  29. Console.WriteLine("Somewhere in Balkans");
  30. Console.WriteLine("Camp - {0:f2}", suma);
  31. }
  32.  
  33. else if (euro > 1000 && euro <= 5000)
  34. {
  35. suma = euro * 0.9;
  36. Console.WriteLine("Somewhere in Europe");
  37. Console.WriteLine("Hotel - {0:f2}", suma);
  38. }
  39. }
  40.  
  41. else if (season == "winter")
  42. {
  43. if (euro >= 10 && euro <= 100)
  44. {
  45. suma = euro * 0.7;
  46. Console.WriteLine("Somewhere in Bulgaria");
  47. Console.WriteLine("Hotel - {0:f2}", suma);
  48. }
  49. else if (euro > 100 && euro <= 1000)
  50. {
  51. suma = euro * 0.8;
  52. Console.WriteLine("Somewhere in Balkans");
  53. Console.WriteLine("Hotel - {0:f2}", suma);
  54. }
  55. else if (euro > 1000 && euro <= 5000)
  56. {
  57. suma = euro * 0.9;
  58. Console.WriteLine("Somewhere in Europe");
  59. Console.WriteLine("Hotel - {0:f2}", suma);
  60. }
  61. }
  62.  
  63.  
  64. }
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement