Advertisement
Guest User

Untitled

a guest
Sep 20th, 2016
928
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 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 SmallShop
  10. {
  11. static void Main(string[] args)
  12. {
  13. var produkt = Console.ReadLine().ToLower();
  14. var sity = Console.ReadLine().ToLower();
  15. var quantity = double.Parse(Console.ReadLine());
  16.  
  17. if (sity == "sofia")
  18. {
  19. if (produkt == "coffee")
  20. {
  21. Console.WriteLine(0.50 * quantity);
  22. }
  23. else if (produkt == "water")
  24. {
  25. Console.WriteLine(0.80 * quantity);
  26. }
  27. else if (produkt == "beer")
  28. {
  29. Console.WriteLine(1.20 * quantity);
  30. }
  31. else if (produkt == "sweets")
  32. {
  33. Console.WriteLine(1.45 * quantity);
  34. }
  35. else if (produkt == "peanuts")
  36. {
  37. Console.WriteLine(1.60 * quantity);
  38. }
  39. }
  40. else if (sity == "plovdiv")
  41. {
  42. if (produkt == "coffee")
  43. {
  44. Console.WriteLine(0.40 * quantity);
  45. }
  46. else if (produkt == "water")
  47. {
  48. Console.WriteLine(0.70 * quantity);
  49. }
  50. else if (produkt == "beer")
  51. {
  52. Console.WriteLine(1.15 * quantity);
  53. }
  54. else if (produkt == "sweets")
  55. {
  56. Console.WriteLine(1.30 * quantity);
  57. }
  58. else if (produkt == "peanuts")
  59. {
  60. Console.WriteLine(1.50 * quantity);
  61. }
  62. }
  63. else if (sity == "varna")
  64. {
  65. if (produkt == "coffee")
  66. {
  67. Console.WriteLine(0.45 * quantity);
  68. }
  69. else if (produkt == "water")
  70. {
  71. Console.WriteLine(0.70 * quantity);
  72. }
  73. else if (produkt == "beer")
  74. {
  75. Console.WriteLine(1.10 * quantity);
  76. }
  77. else if (produkt == "sweets")
  78. {
  79. Console.WriteLine(1.35 * quantity);
  80. }
  81. else if (produkt == "peanuts")
  82. {
  83. Console.WriteLine(1.55 * quantity);
  84. }
  85. }
  86. }
  87. }
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement