miroslavbstoyanov

Untitled

May 13th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4. static void Main()
  5. {
  6. int dograma = int.Parse(Console.ReadLine());
  7. string type = Console.ReadLine();
  8. string typeOfDelivery = Console.ReadLine();
  9.  
  10. double price = 0.0;
  11.  
  12. if (dograma < 10)
  13. {
  14. Console.WriteLine("Invalid order");
  15. }
  16. else if (type == "90X130" || type == "100X150" || type == "130X180" || type == "200X300")
  17. {
  18. if (type == "90X130")
  19. {
  20. price = 110;
  21. if (dograma > 30 && dograma <= 60)
  22. {
  23. //price *= 0.95;
  24. price -= price * 0.05;
  25. }
  26. else if (dograma > 60)
  27. {
  28. //price *= 0.92;
  29. price -= price * 0.08;
  30. }
  31. }
  32. else if (type == "100X150")
  33. {
  34. price = 140;
  35. if (dograma >= 40 && dograma <= 80)
  36. {
  37. price *= 0.94;
  38. }
  39. else if (dograma > 80)
  40. {
  41. //price *= 0.9;
  42. price -= price * 0.1;
  43. }
  44. }
  45. else if (type == "130X180")
  46. {
  47. price = 190;
  48. if (dograma >= 20 && dograma <= 50)
  49. {
  50. //price *= 0.93;
  51. price -= price * 0.07;
  52. }
  53. else if (dograma > 50)
  54. {
  55. //price *= 0.88;
  56. price -= price * 0.12;
  57. }
  58. }
  59. else if (type == "200X300")
  60. {
  61. price = 250;
  62. if (dograma >= 25 && dograma <= 50)
  63. {
  64. //price *= 0.91;
  65. price -= price * 0.09;
  66. }
  67. else if (dograma > 50)
  68. {
  69. //price *= 0.86;
  70. price -= price * 0.14;
  71. }
  72. }
  73. price =price* dograma;
  74. if (typeOfDelivery == "With delivery")
  75. {
  76. price += 60;
  77. }
  78. if (dograma > 99)
  79. {
  80. //price *= 0.96;
  81. price -= price * 0.04;
  82. }
  83. Console.WriteLine($"{price:f2} BGN");
  84. }
  85. }
  86. }
Advertisement
Add Comment
Please, Sign In to add comment