Guest User

Untitled

a guest
Dec 13th, 2019
260
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace qwe123
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string contractDuration = Console.ReadLine();
  10. string contractType = Console.ReadLine();
  11. string internet = Console.ReadLine();
  12. var taxesForMonth = int.Parse(Console.ReadLine());
  13.  
  14. double price = 0.0;
  15.  
  16. switch (contractDuration)
  17. {
  18. case "one":
  19. {
  20. if (contractType == "Small" && internet == "yes")
  21. {
  22. price = (9.98 + 5.50) * taxesForMonth;
  23. }
  24. else if (contractType == "Small" && internet == "no")
  25. {
  26. price = 9.98 * taxesForMonth;
  27.  
  28. }
  29. if (contractType == "Middle" && internet == "yes")
  30. {
  31. price = (18.99 + 4.35) * taxesForMonth;
  32. }
  33. else if (contractType == "Middle" && internet == "no")
  34. {
  35. price = 18.99 * taxesForMonth;
  36.  
  37. }
  38. if (contractType == "Large" && internet == "yes")
  39. {
  40. price = (25.98 + 4.35) * taxesForMonth;
  41. }
  42. else if (contractType == "Large" && internet == "no")
  43. {
  44. price = 25.98 * taxesForMonth;
  45.  
  46. }
  47. if (contractType == "ExtraLarge" && internet == "yes")
  48. {
  49. price = (35.99 + 3.85) * taxesForMonth;
  50. }
  51. else if (contractType == "ExtraLarge" && internet == "no")
  52. {
  53. price = 35.99 * taxesForMonth;
  54.  
  55. }
  56.  
  57. Console.WriteLine($"{price:F2} lv.");
  58. break;
  59. }
  60. case "two":
  61. {
  62. if (contractType == "Small" && internet == "yes")
  63. {
  64. price = (8.58 + 5.50) * taxesForMonth;
  65. }
  66. else if (contractType == "Small" && internet == "no")
  67. {
  68. price = 8.58 * taxesForMonth;
  69.  
  70. }
  71. if (contractType == "Middle" && internet == "yes")
  72. {
  73. price = (17.09 + 4.35) * taxesForMonth;
  74. }
  75. else if (contractType == "Middle" && internet == "no")
  76. {
  77. price = 17.09 * taxesForMonth;
  78.  
  79. }
  80. if (contractType == "Large" && internet == "yes")
  81. {
  82. price = (23.59 + 4.35) * taxesForMonth;
  83. }
  84. else if (contractType == "Large" && internet == "no")
  85. {
  86. price = 23.59 * taxesForMonth;
  87.  
  88. }
  89. if (contractType == "ExtraLarge" && internet == "yes")
  90. {
  91. price = (31.79 + 3.85) * taxesForMonth;
  92. }
  93. else if (contractType == "ExtraLarge" && internet == "no")
  94. {
  95. price = 31.79 * taxesForMonth;
  96.  
  97. }
  98. else
  99. {
  100. double overallprice = price -(price * 0.0375);
  101. Console.WriteLine($"{overallprice:F2} lv.");
  102. }
  103. break;
  104.  
  105. }
  106. }
  107.  
  108. }
  109. }
  110. }
RAW Paste Data