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 budget = double.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- string place = "";
- string region = "";
- double sum = 0;
- switch (season)
- {
- case "summer":
- place = "Camp";
- if (budget <= 100)
- {
- region = "Bulgaria";
- sum = 0.3 * budget;
- }
- else if (budget > 100 && budget <= 1000)
- {
- region = "Balkans";
- sum = 0.4 * budget;
- }
- break;
- case "winter":
- place = "Hotel";
- if (budget <= 100)
- {
- region = "Bulgaria";
- sum = 0.7 * budget;
- }
- else if (budget > 100 && budget <= 1000)
- {
- region = "Balkans";
- sum = 0.8 * budget;
- }
- break;
- }
- if (budget > 1000)
- {
- place = "Hotel";
- region = "Europe";
- sum = 0.9 * budget;
- }
- Console.WriteLine($"Somewhere in {region}");
- Console.WriteLine($"{place} - {sum:F2}");
- }
- }
- }
Add Comment
Please, Sign In to add comment