Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.Design;
- using System.Globalization;
- using System.Reflection;
- using System.Runtime.ConstrainedExecution;
- using System.Security.Cryptography;
- namespace SomeExcercises
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- string destination = "";
- string typeOfHoliday = "";
- switch (season)
- {
- case "summer":
- if (budget <= 100)
- {
- typeOfHoliday = "Camp";
- destination = "Bulgaria";
- budget = budget * 0.30;
- }
- else if (budget <= 1000)
- {
- typeOfHoliday = "Camp";
- destination = "Balkans";
- budget = budget * 0.40;
- }
- else if (budget > 1000)
- {
- typeOfHoliday = "Hotel";
- destination = "Europe";
- budget = budget * 0.90;
- }
- break;
- case "winter":
- if (budget <= 100)
- {
- typeOfHoliday = "Hotel";
- destination = "Bulgaria";
- budget = budget * 0.70;
- }
- else if (budget <= 1000)
- {
- typeOfHoliday = "Hotel";
- destination = "Balkans";
- budget = budget * 0.80;
- }
- else if (budget > 1000)
- {
- typeOfHoliday = "Hotel";
- destination = "Europe";
- budget = budget * 0.90;
- }
- break;
- }
- Console.WriteLine($"Somewhere in {destination}");
- Console.WriteLine($"{typeOfHoliday} - {budget:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment