Може ли малко помощ? Дава ми 40/100. ЗАДАЧА:Лодка за риболов
https://pastebin.com/2HSpB7fs
https://pastebin.com/2HSpB7fs
100% code, ;-)
using System;
namespace fishingBoat
{
class Program
{
static void Main(string[] args)
{
double budget = double.Parse(Console.ReadLine());
string season = Console.ReadLine();
double fishers = double.Parse(Console.ReadLine());
double fishersAmount = fishers % 2;
double priceShip = 0.0;
switch (season)
{
case "Spring": priceShip = 3000; break;
case "Summer":
case "Autumn": priceShip = 4200; break;
case "Winter": priceShip = 2600; break;
default:
break;
}
if (fishers <= 6)
{
priceShip = priceShip * 0.9;
}
else if (fishers > 6 && fishers <= 11)
{
priceShip = priceShip * 0.85;
}
else if (fishers > 12)
{
priceShip = priceShip * 0.75;
}
if (fishersAmount == 0)
{
if (season == "Spring")
{
priceShip = priceShip * 0.95;
}
if (season == "Summer")
{
priceShip = priceShip * 0.95;
}
if (season == "Winter")
{
priceShip = priceShip * 0.95;
}
}
double difference = Math.Abs(budget - priceShip);
if (budget >= priceShip)
{
Console.WriteLine($"Yes! You have {difference:F2} leva left.");
}
else if (budget < priceShip)
{
Console.WriteLine($"Not enough money! You need {difference:F2} leva.");
}
}
}
}
Thanks!