Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CarToGo
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- string car = "Jeep";
- string classes = "Luxury class";
- if (budget > 500)
- {
- budget *= 0.9;
- }
- else if (budget > 100 && budget <= 500)
- {
- if (season == "Summer")
- {
- car = "Cabrio";
- budget *= 0.45;
- }
- else
- {
- budget *= 0.8;
- }
- classes = "Compact class";
- }
- else if (budget > 0 && budget <= 100)
- {
- if (season == "Summer")
- {
- car = "Cabrio";
- budget *= 0.35;
- }
- else
- {
- budget *= 0.65;
- }
- classes = "Economy class";
- }
- Console.WriteLine(classes);
- Console.WriteLine($"{ car} - { budget:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement