Задача 3. Хотелска стая Basics 28 август 2016
Здравейте! Може ли някой да ми помогне да си открия грешката, тъй като в judge ми показва, че имам 80/100.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HotelRoom
{
class Program
{
static void Main(string[] args)
{
string Month = Console.ReadLine();
int Nights = int.Parse(Console.ReadLine());
if (Month == "May" || Month == "October")
{
if (Nights > 7 && Nights <= 14)
{
double PriceStudio = 50.0 - 2.5;
PriceStudio = PriceStudio * Nights;
double PriceAp = 65.0 * Nights;
Console.WriteLine("Apartment: {0:f2} lv.", PriceAp);
Console.WriteLine("Stuidio: {0:f2} lv.", PriceStudio);
}
else if (Nights > 14)
{
double PriceStuido = (50.0 - 15) * Nights;
double PriceAp = (65.0 - 6.5) * Nights;
Console.WriteLine("Apartment: {0:f2} lv.", PriceAp);
Console.WriteLine("Studio: {0:f2} lv.", PriceStuido);
}
else
{
double PriceStuido = 50.0 * Nights;
double PriceAp = 65.0 * Nights;
Console.WriteLine("Apartment: {0:f2} lv.", PriceAp);
Console.WriteLine("Studio: {0:f2} lv.", PriceStuido);
}
}
else if (Month == "June" || Month == "September")
{
if (Nights > 14)
{
double PriceStuido = (75.20 - 0.2 * 75.20) * Nights;
double PriceAp = (68.70 - 68.70 * 0.10) * Nights;
Console.WriteLine("Apartment: {0:f2} lv.", PriceAp);
Console.WriteLine("Studio: {0:f2} lv.", PriceStuido);
}
else
{
double PriceStuido = 75.20 * Nights;
double PriceAp = 68.70 * Nights;
Console.WriteLine("Apartment: {0:f2} lv.", PriceAp);
Console.WriteLine("Studio: {0:f2} lv.", PriceStuido);
}
}
else if(Month == "July" || Month == "August")
{
if (Nights > 14)
{
double PriceStuido = 76.0 * Nights;
double PriceAp = (77.0 - 77.0 * 0.1) * Nights;
Console.WriteLine("Apartment: {0:f2} lv.", PriceAp);
Console.WriteLine("Studio: {0:f2} lv.", PriceStuido);
}
else
{
double PriceStuido = 76.0 * Nights;
double PriceAp = 77.0 * Nights;
Console.WriteLine("Apartment: {0:f2} lv.", PriceAp);
Console.WriteLine("Studio: {0:f2} lv.", PriceStuido);
}
}
}
}
}