Advertisement
spasnikolov131

Untitled

Nov 10th, 2020
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. using System;
  2. using System.Runtime.InteropServices.ComTypes;
  3.  
  4. namespace Aluminum_windows
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. double countWindows = double.Parse(Console.ReadLine());
  11. string windowsSize = Console.ReadLine();
  12. string shipmentMethod = Console.ReadLine();
  13. double price = 0;
  14.  
  15. switch (windowsSize)
  16. {
  17. case "90X130":
  18. double price = countWindows * 110;
  19. if (countWindows >= 30)
  20. {
  21. price = price - (price * 0.5);
  22. }
  23. else if (countWindows >= 60)
  24. {
  25. price = price - (price * 0.8);
  26. }
  27. Console.WriteLine(price);
  28. break;
  29.  
  30. case "100X150":
  31. double price = countWindows * 140;
  32. if (countWindows >= 40)
  33. {
  34. price = price - (price * 0.6);
  35. }
  36. else if (countWindows >= 80)
  37. {
  38. price = price - (price * 1);
  39. }
  40. break;
  41. case "130X180":
  42. double price = countWindows * 190;
  43. if (countWindows >= 20)
  44. {
  45. price = price - (price * 0.7);
  46. }
  47. else if (countWindows >= 50)
  48. {
  49. price = price - (price * 1.2);
  50. }
  51. break;
  52. case "200X300":
  53. double price = countWindows * 250;
  54. if (countWindows >= 25)
  55. {
  56. price = price - (price * 0.9);
  57. }
  58. else if (countWindows >= 50)
  59. {
  60. price = price - (price * 1.4);
  61. }
  62. break;
  63. }
  64. if (countWindows >= 99)
  65. {
  66. price = price * 0.4;
  67. }
  68. else if (countWindows <= 10)
  69. {
  70. Console.WriteLine("Invalid Order");
  71. }
  72. Console.WriteLine($"{price:f2} BGN");
  73. }
  74. }
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement