Advertisement
spasnikolov131

Untitled

Mar 27th, 2022
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. using System;
  2. using static System.Console;
  3.  
  4. namespace The_begining
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. int countDograma = int.Parse(Console.ReadLine());
  11. string kindDograma = Console.ReadLine();
  12. string delivery = Console.ReadLine();
  13. double price = 0;
  14.  
  15. switch (kindDograma)
  16. {
  17. case "90X130":
  18. price = 110;
  19.  
  20. if (countDograma >30)
  21. {
  22. price *= countDograma;
  23. price -= (0.05 * price);
  24. }
  25. else if(countDograma > 60)
  26. {
  27. price *= countDograma;
  28. price -= (0.08 * price);
  29. }
  30.  
  31. break;
  32. case "100X150":
  33. price = 140;
  34.  
  35. if (countDograma > 40)
  36. {
  37. price *= countDograma;
  38. price -= (0.06 * price);
  39. }
  40. else if (countDograma > 80)
  41. {
  42. price *= countDograma;
  43. price -= (0.10 * price);
  44. }
  45. break;
  46. case "130X180":
  47. price = 190;
  48.  
  49. if (countDograma > 20)
  50. {
  51. price *= countDograma;
  52. price -= (0.07 * price);
  53. }
  54. else if (countDograma > 50)
  55. {
  56. price *= countDograma;
  57. price -= (0.12 * price);
  58. }
  59. break;
  60. case "200X300":
  61. price = 250;
  62.  
  63. if (countDograma > 25)
  64. {
  65. price *= countDograma;
  66. price -= (0.09 * price);
  67. }
  68. else if (countDograma > 50)
  69. {
  70. price *= countDograma;
  71. price -= (0.14 * price);
  72. }
  73. break;
  74.  
  75. }
  76. if (countDograma > 99)
  77. {
  78. price = price + (price *= 0.04);
  79. }
  80. if (countDograma < 10)
  81. {
  82. Console.WriteLine("Invalid order");
  83.  
  84. }
  85. if (delivery == "With delivery")
  86. {
  87.  
  88. }
  89. if (delivery == "Without delivery")
  90. {
  91.  
  92. }
  93. Console.WriteLine($"{price:f2} BGN");
  94. }
  95. }
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement