Advertisement
baobaobao

TradeComissions

Jul 28th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace TradeComissions
  8. {
  9. class TradeComissions
  10. {
  11. static void Main(string[] args)
  12. {
  13. string town = Console.ReadLine().ToLower();
  14. var s = double.Parse(Console.ReadLine());
  15. double comission = -1;
  16. var result = comission * s;
  17.  
  18. if (town == "Sofia")
  19. {
  20. if (s>=0&&s<=500)
  21. {
  22. comission = 0.05;
  23. }
  24. if (s>=500&&s<=1000)
  25. {
  26. comission = 7 / 100;
  27. }
  28. if (s>=1000&&s<=10000)
  29. {
  30. comission = 8 / 100;
  31. }
  32. if (s > 10000)
  33. {
  34. comission = 12 / 100;
  35. }
  36.  
  37. }
  38. if (town == "Varna")
  39. {
  40. if (s >= 0&& s <= 500)
  41. {
  42. comission = 4.5 / 100;
  43. }
  44. if (s >= 500 && s <= 1000)
  45. {
  46. comission = 7.5 / 100;
  47. }
  48. if (s >= 1000 && s <= 10000)
  49. {
  50. comission = 10 / 100;
  51.  
  52. }
  53. if (s > 10000)
  54. {
  55. comission = 13 / 100;
  56.  
  57. }
  58. }
  59. if (town == "Plovdiv")
  60. {
  61. if (s >= 0&&s <= 500)
  62. {
  63.  
  64. comission = 5.5 / 100;
  65.  
  66. }
  67. if (s >= 500 && s <= 1000)
  68. {
  69. comission = 8 / 100;
  70.  
  71. }
  72. if (s >= 1000 && s <= 10000)
  73. {
  74. comission = 12 / 100;
  75.  
  76. }
  77. if (s > 10000)
  78. {
  79. comission = 14.5 / 100;
  80.  
  81. }
  82.  
  83.  
  84. }
  85.  
  86.  
  87. Console.WriteLine(result);
  88.  
  89. }
  90. }
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement