Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Roadtrip
- {
- class Program
- {
- static void Main(string[] args)
- {
- double initbudget = double.Parse(Console.ReadLine());
- double budget = initbudget;
- string season = Console.ReadLine();
- string destination = string.Empty;
- string rest = string.Empty;
- if (budget <= 100)
- {
- if (season == "summer")
- {
- budget -= budget * 0.30;
- rest = "Camp";
- }
- else if (season == "winter")
- {
- budget -= budget * 0.70;
- rest = "Hotel";
- }
- destination = "Bulgaria";
- }
- else if (budget <= 1000)
- {
- if (season == "summer")
- {
- budget -= budget * 0.4;
- rest = "Camp";
- }
- else if (season == "winter")
- {
- budget -= budget * 0.8;
- rest = "Hotel";
- }
- destination = "Balkans";
- }
- else if (budget > 1000)
- {
- budget -= budget * 0.9;
- /*if (season == "summer")
- rest = "Camp";
- else if (season == "winter")*/
- rest = "Hotel";
- destination = "Europe";
- }
- double moneyspent = initbudget - budget;
- Console.WriteLine($"Somewhere in {destination}");
- Console.WriteLine($"{rest} - {moneyspent:f2}");
- }
- }
- }
Add Comment
Please, Sign In to add comment