07. Hotel Room
В judge дава 80/100, но защо ?
string month = Console.ReadLine();
int nights = int.Parse(Console.ReadLine());
double studioPrice = 0.0;
double apartmentPrice = 0.0;
if (month == "May" || month == "October")
{
studioPrice = 50;
apartmentPrice = 65;
if (nights < 7 && nights > 0)
{
studioPrice = studioPrice * 0.95;
}
else if (nights > 14 && nights > 0)
{
studioPrice = studioPrice * 0.70;
}
}
else if (month == "June" || month == "September")
{
studioPrice = 75.20;
apartmentPrice = 68.70;
if (nights > 14 && nights > 0)
{
studioPrice = studioPrice * 0.80;
}
}
else if (month == "July" || month == "August")
{
studioPrice = 76;
apartmentPrice = 77;
}
if (nights > 14 && nights > 0) { apartmentPrice = apartmentPrice * 0.90; }
Console.WriteLine($"Apartment: {(apartmentPrice * nights):f2} lv.");
Console.WriteLine($"Studio: {(studioPrice * nights):f2} lv.");