Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- int dograma = int.Parse(Console.ReadLine());
- string type = Console.ReadLine();
- string typeOfDelivery = Console.ReadLine();
- double price = 0.0;
- if (dograma < 10)
- {
- Console.WriteLine("Invalid order");
- }
- else if (type == "90X130" || type == "100X150" || type == "130X180" || type == "200X300")
- {
- if (type == "90X130")
- {
- price = 110;
- if (dograma > 30 && dograma <= 60)
- {
- //price *= 0.95;
- price -= price * 0.05;
- }
- else if (dograma > 60)
- {
- //price *= 0.92;
- price -= price * 0.08;
- }
- }
- else if (type == "100X150")
- {
- price = 140;
- if (dograma >= 40 && dograma <= 80)
- {
- price *= 0.94;
- }
- else if (dograma > 80)
- {
- //price *= 0.9;
- price -= price * 0.1;
- }
- }
- else if (type == "130X180")
- {
- price = 190;
- if (dograma >= 20 && dograma <= 50)
- {
- //price *= 0.93;
- price -= price * 0.07;
- }
- else if (dograma > 50)
- {
- //price *= 0.88;
- price -= price * 0.12;
- }
- }
- else if (type == "200X300")
- {
- price = 250;
- if (dograma >= 25 && dograma <= 50)
- {
- //price *= 0.91;
- price -= price * 0.09;
- }
- else if (dograma > 50)
- {
- //price *= 0.86;
- price -= price * 0.14;
- }
- }
- price =price* dograma;
- if (typeOfDelivery == "With delivery")
- {
- price += 60;
- }
- if (dograma > 99)
- {
- //price *= 0.96;
- price -= price * 0.04;
- }
- Console.WriteLine($"{price:f2} BGN");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment