Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace dddd
- {
- class Program
- {
- static void Main(string[] args)
- {
- //вход в конзолата - буджет, сезон
- double moneyHave = double.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- double spendMoney = 0;
- //изчисляване ако има 100< някъде в България
- // Лято – 30% от бюджета
- //Зима – 70 % от бюджета
- if (moneyHave <= 100)
- {
- Console.WriteLine("Somewhere in Bulgaria");
- if (season == "summer")
- {
- spendMoney = moneyHave * 0.3;
- Console.WriteLine($"Camp - {spendMoney:f2}");
- }
- else if (season == "winer" )
- {
- spendMoney = moneyHave * 0.7;
- Console.WriteLine($"Hotel - {spendMoney:f2}");
- }
- }
- if (moneyHave > 100 && moneyHave <=1000)
- {
- Console.WriteLine("Somewhere in Balkans");
- if (season == "summer")
- {
- spendMoney = moneyHave * 0.4;
- Console.WriteLine($"Camp - {spendMoney:f2}");
- }
- else if (season == "winter")
- {
- spendMoney = moneyHave * 0.8;
- Console.WriteLine($"Hotel - {spendMoney:f2}");
- }
- }
- if (moneyHave > 1000)
- {
- Console.WriteLine("Somewhere in Europe");
- spendMoney = moneyHave * 0.9;
- Console.WriteLine($" Hotel - {spendMoney:f2}");
- }
- }
- }
- }
- //изчисляване ако има 1000лв. или по малко – някъде на Балканите
- //Лято – 40% от бюджетаo Зима – 80 % от бюджета
- //ако има повече от 1000лв. – някъде из Европа
- //При пътуване из Европа, независимо от сезона ще похарчи 90 % от бюджета.
- // Първи ред – „Somewhere in [дестинация]“ измежду “Bulgaria", "Balkans” и ”Europe”
- //Втори ред – “{ Вид почивка} – { Похарчена сума}“
Add Comment
Please, Sign In to add comment