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 Program
- {
- static void Main(string[] args)
- {
- string city = Console.ReadLine().ToLower();
- double money = double.Parse(Console.ReadLine());
- var result = 0.0;
- if (city=="sofia")
- {
- if (money >= 0 && money <= 500)
- {
- result = money * 0.05;
- }
- else if (money > 500 && money <= 1000)
- {
- result = money * 0.07;
- }
- else if (money > 1000 && money <= 10000)
- {
- result = money * 0.08;
- }
- else if (money > 10000)
- {
- result = money * 0.12;
- }
- }
- else if (city=="plovdiv")
- {
- if (money >= 0 && money <= 500)
- {
- result = money * 0.055;
- }
- else if (money > 500 && money <= 1000)
- {
- result = money * 0.08;
- }
- else if (money > 1000 && money <= 10000)
- {
- result = money * 0.12;
- }
- else if (money > 10000)
- {
- result = money * 0.145;
- }
- }
- else if (city=="varna")
- {
- if (money >= 0 && money <= 500)
- {
- result = money * 0.045;
- }
- else if (money > 500 && money <= 1000)
- {
- result = money * 0.075;
- }
- else if (money > 1000 && money <= 10000)
- {
- result = money * 0.1;
- }
- else if (money > 10000)
- {
- result = money * 0.13;
- }
- }
- if (result!=0)
- {
- Console.WriteLine("{0:f2}", result);
- }
- else
- {
- Console.WriteLine("error");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment