Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Courier_Express
- {
- class Program
- {
- static void Main(string[] args)
- {
- double kg = double.Parse(Console.ReadLine());
- string type = Console.ReadLine();
- double km = double.Parse(Console.ReadLine());
- var money = 0.0;
- var addOn = 0.0;
- if (type == "standart")
- {
- if (kg < 1)
- {
- money = 0.03;
- addOn = 0.8;
- }
- else if (kg >= 1 && kg <= 10)
- {
- money = 0.05;
- addOn = 0.4;
- }
- else if (kg >= 11 && kg <= 40)
- {
- money = 0.1;
- addOn = 0.05;
- }
- else if (kg >= 41 && kg <= 90)
- {
- money = 0.15;
- addOn = 0.02;
- }
- else
- {
- money = 0.20;
- addOn = 0.01;
- }
- }
- var neshto = km * money;
- if (type == "express")
- {
- neshto += km * addOn * kg;
- }
- Console.WriteLine($"The delivery of your shipment with weight of {kg:f3} kg. would cost {neshto:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement