Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Journey
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budjet = double.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- string destination = "";
- double price = 0;
- string accommodation = "";
- switch (season)
- {
- case "Summer":
- if (budjet <= 100)
- {
- destination = "Bulgaria";
- accommodation = "Camp";
- price = budjet * 0.30;
- }
- else if (budjet > 100 && budjet <= 1000)
- {
- destination = "Balkans";
- accommodation = "Camp";
- price = budjet * 0.40;
- }
- else if (budjet > 1000)
- {
- destination = "Europe";
- accommodation = "Camp";
- price = budjet * 0.90;
- }
- break;
- case "Winter":
- if (budjet <= 100)
- {
- destination = "Bulgaria";
- accommodation = "Hotel";
- price = budjet * 0.70;
- }
- else if (budjet <= 1000)
- {
- destination = "Balkans";
- accommodation = "Hotel";
- price = budjet * 0.80;
- }
- else if (budjet > 1000)
- {
- destination = "Europe";
- accommodation = "Hotel";
- price = budjet * 0.90;
- }
- Console.WriteLine($"Somewhere in {destination}");
- Console.WriteLine($"{accommodation} - {price:f2}");
- break;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment