EmoRz

SmallShop

Jun 29th, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 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 SmallShop
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. var product = Console.ReadLine().ToString();
  15. var town = Console.ReadLine().ToString();
  16. var quantity = double.Parse(Console.ReadLine());
  17.  
  18. if (town == "Sofia")
  19. {
  20. if (product == "coffee")
  21. {
  22. Console.WriteLine(quantity * 0.50);
  23. }
  24.  
  25. if (product == "water")
  26. {
  27. Console.WriteLine(quantity * 0.8);
  28. }
  29. if (product == "beer")
  30. {
  31. Console.WriteLine(quantity * 1.2);
  32. }
  33. if (product == "sweets")
  34. {
  35. Console.WriteLine(quantity*1.45);
  36. }
  37. if (product == "peanuts")
  38. {
  39. Console.WriteLine(quantity*1.6);
  40. }
  41. }
  42. if (town == "Plovdiv")
  43. {
  44. if (product == "coffee")
  45. {
  46. Console.WriteLine(quantity * 0.4);
  47. }
  48. if (product == "water")
  49. {
  50. Console.WriteLine(quantity * 0.7);
  51. }
  52. if (product == "beer")
  53. {
  54. Console.WriteLine(quantity * 1.15);
  55. }
  56. if (product == "sweets")
  57. {
  58. Console.WriteLine(quantity * 1.3);
  59. }
  60. if (product == "peanuts")
  61. {
  62. Console.WriteLine(quantity * 1.5);
  63. }
  64. }
  65. if (town == "Varna")
  66. {
  67. if (product == "coffee")
  68. {
  69. Console.WriteLine(quantity * 0.45);
  70. }
  71. if (product == "water")
  72. {
  73. Console.WriteLine(quantity * 0.7);
  74. }
  75. if (product == "beer")
  76. {
  77. Console.WriteLine(quantity * 1.1);
  78. }
  79. if (product == "sweets")
  80. {
  81. Console.WriteLine(quantity * 1.35);
  82. }
  83. if (product == "peanuts")
  84. {
  85. Console.WriteLine(quantity * 1.55);
  86. }
  87. }
  88. }
  89. }
  90. }
Advertisement
Add Comment
Please, Sign In to add comment