EmoRz

Задача 03 - Пътешествие

Jul 3rd, 2016
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 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. var budget = double.Parse(Console.ReadLine());
  14. var season = Console.ReadLine();
  15.  
  16. if(season=="summer"&&budget<=100)
  17. {
  18. Console.WriteLine("Somewhere in Bulgaria ");
  19. Console.WriteLine("Camp - {0:f2}", budget*0.3);
  20.  
  21. }
  22. else if(season=="winter"&&budget<=100)
  23. {
  24. Console.WriteLine("Somewhere in Bulgaria ");
  25. Console.WriteLine("Hotel - {0:f2}", budget * 0.7);
  26. }
  27. else if (season == "summer"&&budget<=1000)
  28. {
  29. Console.WriteLine("Somewhere in Balkans ");
  30. Console.WriteLine("Camp - {0:f2}", budget * 0.4);
  31.  
  32. }
  33. else if (season == "winter"&&budget<=1000)
  34. {
  35. Console.WriteLine("Somewhere in Balkans ");
  36. Console.WriteLine("Hotel - {0:f2}", budget * 0.8);
  37. }
  38. else if(season=="summer"&&budget>=1000)
  39. {
  40. Console.WriteLine("Somewhere in Europe");
  41. Console.WriteLine("Hotel - {0:f2}", budget * 0.9);
  42. }
  43. else if (season == "winter"&&budget>=1000)
  44. {
  45. Console.WriteLine("Somewhere in Europe ");
  46. Console.WriteLine("Hotel - {0:f2}", budget * 0.9);
  47. }
  48. }
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment