Задача 3. Алуминиева дограма. 72 / 100
using System;
namespace _3._Aluminum_Joinery
{
class Program
{
static void Main(string[] args)
{
int numJoinery = int.Parse(Console.ReadLine());
string kindOfJoinery = Console.ReadLine();
string kindOfDelivary = Console.ReadLine();
const double delivery = 60;
double totalPrice = 0;
double priceOfJoinery = 0;
double priceWhitDiscount = 0;
if (numJoinery <= 10)
{
Console.WriteLine("Invalid order");
}
else
{
switch (kindOfJoinery)
{
case "90X130":
priceOfJoinery = 110;
totalPrice = numJoinery * priceOfJoinery;
if (numJoinery > 30 && numJoinery <= 60)
{
priceWhitDiscount = totalPrice - totalPrice * 0.05;
}
else
{
priceWhitDiscount = totalPrice - totalPrice * 0.08;
}
break;
case "100X150":
priceOfJoinery = 140;
totalPrice = numJoinery * priceOfJoinery;
if (numJoinery > 40 && numJoinery <= 80)
{
priceWhitDiscount = totalPrice - totalPrice * 0.06;
}
else
{
priceWhitDiscount = totalPrice - totalPrice * 0.1;
}
break;
case "130X180":
priceOfJoinery = 190;
totalPrice = numJoinery * priceOfJoinery;
if (numJoinery > 20 && numJoinery <= 50)
{
priceWhitDiscount = totalPrice - totalPrice * 0.07;
}
else
{
priceWhitDiscount = totalPrice - totalPrice * 0.12;
}
break;
case "200X300":
priceOfJoinery = 250;
totalPrice = numJoinery * priceOfJoinery;
if (numJoinery > 25 && numJoinery <= 50)
{
priceWhitDiscount = totalPrice - totalPrice * 0.09;
}
else
{
priceWhitDiscount = totalPrice - totalPrice * 0.14;
}
break;
}
if (kindOfDelivary == "With delivery")
{
priceWhitDiscount += delivery;
if (numJoinery > 99)
{
priceWhitDiscount = priceWhitDiscount - priceWhitDiscount * 0.04;
}
}
Console.WriteLine($"{priceWhitDiscount:f2} BGN");
}
}
}
}