Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _03.Trip
- {
- class Program
- {
- static void Main(string[] args)
- {
- var budget = double.Parse(Console.ReadLine());
- var season = Console.ReadLine();
- var spentMoney = 0.0;
- var vacation = "";
- var country = "";
- if (budget<=100)
- {
- switch (season)
- {
- case "summer":
- spentMoney = budget * 0.3;
- vacation = "Camp";
- country = "Bulgaria";
- break;
- case "winter":
- spentMoney = budget * 0.7;
- vacation = "Hotel";
- country = "Bulgaria";
- break;
- }
- }
- else if (budget <= 1000)
- {
- switch (season)
- {
- case "summer":
- spentMoney = budget * 0.4;
- vacation = "Camp";
- country = "Balkans";
- break;
- case "winter":
- spentMoney = budget * 0.8;
- vacation = "Hotel";
- country = "Balkans";
- break;
- }
- }
- else
- {
- switch (season)
- {
- case "summer":
- spentMoney = budget * 0.9;
- vacation = "Hotel";
- country = "Europe";
- break;
- case "winter":
- spentMoney = budget * 0.9;
- vacation = "Hotel";
- country = "Europe";
- break;
- }
- }
- Console.WriteLine("Somewhere in {0}", country);
- Console.WriteLine("{0} - {1:f2}", vacation, spentMoney);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement