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 _6.Лодка_за_риболов
- {
- class Program
- {
- static void Main(string[] args)
- {
- int budget = int.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- int numberFishers = int.Parse(Console.ReadLine());
- double naem = 0;
- if (season == "Spring")
- {
- naem = 3000;
- }
- else if (season == "Summer" || season == "Autumn")
- {
- naem = 4200;
- }
- else if (season == "Winter")
- {
- naem = 2600;
- }
- if (numberFishers <= 6)
- {
- naem *= 0.90;
- }
- else if (numberFishers > 7 && numberFishers <= 11)
- {
- naem *= 0.85;
- }
- else if (numberFishers >= 12)
- {
- naem *= 0.75;
- }
- if (numberFishers % 2 == 0 && season != "Autumn")
- {
- naem *=0.95;
- }
- if (budget < naem)
- {
- Console.WriteLine($"Not enough money! You need {naem - budget:f2} leva.");
- }
- else
- {
- Console.WriteLine($"Yes! You have {budget - naem:f2} leva left.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement