Vacation problem
Колеги, дава ми 83т.?! Избодох си очите и не мога да си видя грешката - бихте ли погледнали кода, нещо греша, Благодаря предварително и Успех!...
using System;
namespace basicSintax
{
class Program
{
static void Main()
{
var peoples = int.Parse(Console.ReadLine());
var kindPeoples = Console.ReadLine();
var day = Console.ReadLine();
var price = 0.0;
var discount = 0.0;
var totalPrice = 0.0;
if (day == "Friday")
{
if (kindPeoples == "Business")
{
price = 10.90;
}
else if (kindPeoples == "Students")
{
price = 8.45;
}
else if (kindPeoples == "Regular")
{
price = 15;
}
}
if (day == "Saturday")
{
if (kindPeoples == "Business")
{
price = 15.60;
}
else if (kindPeoples == "Students")
{
price = 9.80;
}
else if (kindPeoples == "Regular")
{
price = 20;
}
}
if (day == "Sunday")
{
if (kindPeoples == "Business")
{
price = 16;
}
else if (kindPeoples == "Students")
{
price = 10.46;
}
else if (kindPeoples == "Regular")
{
price = 22.50;
}
}
if (peoples >= 100 && kindPeoples == "Business")
{
discount = 10 * peoples;
price -= discount;
}
else if (peoples >= 30 && kindPeoples == "Students")
{
discount = price * 0.15;
price -= discount;
}
else if (peoples >= 10 && peoples <= 20 && kindPeoples == "Regular")
{
discount *= 0.05;
price -= discount;
}
totalPrice = price * peoples;
Console.WriteLine($"Total price: {totalPrice:f2}");
}
}
}