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 TradeComissions
- {
- class TradeComissions
- {
- static void Main(string[] args)
- {
- string town = Console.ReadLine().ToLower();
- var s = double.Parse(Console.ReadLine());
- double comission = -1;
- var result = comission * s;
- if (town == "Sofia")
- {
- if (s>=0&&s<=500)
- {
- comission = 0.05;
- }
- if (s>=500&&s<=1000)
- {
- comission = 7 / 100;
- }
- if (s>=1000&&s<=10000)
- {
- comission = 8 / 100;
- }
- if (s > 10000)
- {
- comission = 12 / 100;
- }
- }
- if (town == "Varna")
- {
- if (s >= 0&& s <= 500)
- {
- comission = 4.5 / 100;
- }
- if (s >= 500 && s <= 1000)
- {
- comission = 7.5 / 100;
- }
- if (s >= 1000 && s <= 10000)
- {
- comission = 10 / 100;
- }
- if (s > 10000)
- {
- comission = 13 / 100;
- }
- }
- if (town == "Plovdiv")
- {
- if (s >= 0&&s <= 500)
- {
- comission = 5.5 / 100;
- }
- if (s >= 500 && s <= 1000)
- {
- comission = 8 / 100;
- }
- if (s >= 1000 && s <= 10000)
- {
- comission = 12 / 100;
- }
- if (s > 10000)
- {
- comission = 14.5 / 100;
- }
- }
- Console.WriteLine(result);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement