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 journey1
- {
- class journey
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- string destination = string.Empty;
- string place = string.Empty;
- double price = 0;
- if (budget <= 100)
- {
- destination = "Bulgaria";
- if (season == "summer")
- {
- place = "camp";
- price = budget - (0.3 * budget);
- }
- else if (season == "winter")
- {
- place = "hotel";
- price = budget - (0.7 * budget);
- }
- }
- else if (budget <= 1000)
- {
- destination = "Balkans";
- if (season == "summer")
- {
- place = "camp";
- price = budget - (0.4 * budget);
- }
- else if (season == "winter")
- {
- place = "hotel";
- price = budget - (0.8 * budget);
- }
- }
- else if (budget > 1000)
- {
- destination = "Europe";
- price = budget - (0.9 * budget);
- }
- Console.WriteLine($"Somewhere in {destination}");
- Console.WriteLine($"{place} - {Math.Round(price,2)}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement