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 CarToGo
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- if (budget > 500) //кода се изпълнява с предимство за богатите
- {
- var jeep = budget * 0.90;
- Console.WriteLine("Luxury class");
- Console.WriteLine("Jeep - {0:f2}", jeep);
- }
- else if (season == "Summer")
- {
- if (budget > 100 && budget <= 500)
- {
- Console.WriteLine("Compact class");
- Console.WriteLine($"Cabrio - {budget * 0.45:f2}");
- }
- if (budget < 100)
- {
- Console.WriteLine("Economy class");
- Console.WriteLine($"Cabrio - {budget * 0.35:f2}");
- }
- }
- else if (season == "Winter")
- {
- if (budget > 100 && budget <= 500)
- {
- Console.WriteLine("Compact class");
- Console.WriteLine($"Jeep - {budget * 0.80:f2}");
- }
- if (budget < 100)
- {
- Console.WriteLine("Economy class");
- Console.WriteLine($"Jeep - {budget * 0.65:f2}");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement