Fund C# Basic and Syntax Exercise 03. Vacation. I have 91% in Judge , pls help !
using System;
namespace Vacation
{
class Program
{
static void Main(string[] args)
{
int people = int.Parse(Console.ReadLine());
string group = Console.ReadLine();
string weekDay = Console.ReadLine();
double price = 0;
double otstupka = 0;
if (group == "Students")
{
if (weekDay == "Friday")
{
price = 8.45;
}
else if (weekDay == "Saturday")
{
price = 9.80;
}
else if (weekDay == "Sunday")
{
price = 10.46;
}
price = price * people;
if (people < 30)
{
Console.WriteLine($"Total price: {price:F2}");
}
if (people >= 30)
{
otstupka = price - price * 15 / 100;
Console.WriteLine($"Total price: {otstupka:F2}");
}
}
if (group == "Business")
{
if (weekDay == "Friday")
{
price = 10.90;
}
else if (weekDay == "Saturday")
{
price = 15.60;
}
else if (weekDay == "Sunday")
{
price = 16.0;
}
price = price * people;
if (people < 100)
{
Console.WriteLine($"Total price: {price:F2}");
}
if (people >= 100)
{
otstupka = (people - 10) * price;
Console.WriteLine($"Total price: {otstupka:F2}");
}
}
if (group == "Regular")
{
if (weekDay == "Friday")
{
price = 15.0;
}
else if (weekDay == "Saturday")
{
price = 20.0;
}
else if (weekDay == "Sunday")
{
price = 22.50;
}
price = price * people;
if (people >= 10 && people<= 20)
{
otstupka = price - price * 5 / 100;
Console.WriteLine($"Total price: {otstupka:F2}");
}
else
{
Console.WriteLine($"Total price: {price:F2}");
}
}
}
}
}