Здравейте, имам проблем със задачата Hotel Room, judge системата ми дава 70 точки, малко помощ
using System;
namespace _08._Hotel_Room
{
class Program
{
static void Main(string[] args)
{
string month = Console.ReadLine();
double sumnight = double.Parse(Console.ReadLine());
double pricestudio = 0.0;
double priceapartment = 0.0;
switch (month)
{
case "May":
pricestudio = 50;
priceapartment = 65;
break;
case "October":
pricestudio = 50;
priceapartment = 65;
break;
case "June":
pricestudio = 75.20;
priceapartment = 68.70;
break;
case "September":
pricestudio = 75.20;
pricestudio = 68.70;
break;
case "JulY":
pricestudio = 76;
priceapartment = 77;
break;
case "August":
pricestudio = 76;
priceapartment = 77;
break;
}
if (sumnight > 7 && sumnight < 14 && (month == "May" || month == "October"))
{
pricestudio = pricestudio * 0.95;
}
else if (sumnight > 14 && (month == "May" || month == "October"))
{
pricestudio = pricestudio * 0.70;
}
else if ((sumnight > 14 && (month == "June" || month == "September")))
{
pricestudio = pricestudio * 0.80;
}
if (sumnight > 14) { priceapartment = priceapartment * 0.90; }
double totalstud = pricestudio * sumnight;
double totalapart = priceapartment * sumnight;
Console.WriteLine($"Apartment: {totalapart:f2} lv.");
Console.WriteLine($"Studio: {totalstud:f2} lv.");
}
}
}
Благодаря ти :)