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 Problem_03___Vacation
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- var price = 0.0;
- string place = null;
- string location = null;
- if (budget <= 1000)
- {
- place = "Camp";
- if (season == "Summer")
- {
- location = "Alaska";
- price = budget * 0.65;
- Math.Round(price, 2);
- }
- else if (season == "Winter")
- {
- location = "Morocco ";
- price = budget * 0.45;
- Math.Round(price, 2);
- }
- }
- if ( budget > 1000 && budget <= 3000)
- {
- place = "Hut";
- if (season == "Summer")
- {
- location = "Alaska";
- price = budget * 0.80;
- Math.Round(price, 2);
- }
- else if (season == "Winter")
- {
- location = "Morocco";
- price = budget * 0.60;
- Math.Round(price, 2);
- }
- }
- else if (budget > 3000)
- {
- place = "Hotel";
- price = budget * 0.90;
- Math.Round(price, 2);
- if (season == "Summer")
- {
- location = "Alaska";
- }
- else if (season == "Winter")
- {
- location = "Morocco";
- }
- }
- Console.WriteLine($"{location} - {place} - {price:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement