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 Travel
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- //budget<=100(Bulgaria)
- if(budget<=100.0)
- {
- if (season == "summer")
- {
- double cost = budget * 0.30;
- Console.WriteLine("Somewhere in Bulgaria");
- Console.WriteLine("Camp - {0:f2}",cost);
- }
- else if(season=="winter")
- {
- double cost = budget * 0.70;
- Console.WriteLine("Somewhere in Bulgaria");
- Console.WriteLine("Hotel - {0:f2}", cost);
- }
- }
- //budget>100 && budget<=100
- if (budget > 100.0&&budget<=1000)
- {
- if (season == "summer")
- {
- double cost = budget * 0.40;
- Console.WriteLine("Somewhere in Balkans");
- Console.WriteLine("Camp - {0:f2}", cost);
- }
- else if (season == "winter")
- {
- double cost = budget * 0.80;
- Console.WriteLine("Somewhere in Balkans");
- Console.WriteLine("Hotel - {0:f2}", cost);
- }
- }
- //budget>1000
- if (budget > 1000.0)
- {
- if (season == "summer")
- {
- double cost = budget * 0.90;
- Console.WriteLine("Somewhere in Europe");
- Console.WriteLine("Hotel - {0:f2}", cost);
- }
- else if (season == "winter")
- {
- double cost = budget * 0.90;
- Console.WriteLine("Somewhere in Europe");
- Console.WriteLine("Hotel - {0:f2}", cost);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment