Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.38 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace SoftUniExamDekemwri2019_2._5
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. string fruit = Console.ReadLine();
  13. string size = Console.ReadLine();
  14. int orderedSets = int.Parse(Console.ReadLine());
  15.  
  16. var total = 0.0;
  17. var priceOfNum = 0.0;
  18. var priceOfSets = 0.0;
  19.  
  20.  
  21. if (fruit == "Watermelon")
  22. {
  23. if (size == "small")
  24. {
  25. priceOfNum = 56 * 2;
  26. priceOfSets = orderedSets * priceOfNum;
  27. if (priceOfSets >= 400 && priceOfSets <= 1000)
  28. {
  29. total = priceOfSets - (priceOfSets * 0.15);
  30. Console.WriteLine("{0:f2} lv.", total);
  31. }
  32. else
  33. {
  34. if (priceOfSets > 1000)
  35. {
  36. total = priceOfSets - (priceOfSets * 0.5);
  37. Console.WriteLine("{0:f2} lv.", total);
  38. }
  39. else
  40. {
  41. if (priceOfSets < 400)
  42. {
  43. total = orderedSets * priceOfNum;
  44. Console.WriteLine("{0:f2} lv.", total);
  45. }
  46. }
  47. }
  48. }
  49. else
  50. {
  51. if (size == "big")
  52. {
  53. priceOfNum = 28.70 * 5;
  54. priceOfSets = orderedSets * priceOfNum;
  55. if (priceOfSets >= 400 && priceOfSets <= 1000)
  56. {
  57. total = priceOfSets - (priceOfSets * 0.15);
  58. Console.WriteLine("{0:f2} lv.", total);
  59. }
  60. else
  61. {
  62. if (priceOfSets > 1000)
  63. {
  64. total = priceOfSets - (priceOfSets * 0.5);
  65. Console.WriteLine("{0:f2} lv.", total);
  66. }
  67. else
  68. {
  69. if (priceOfSets < 400)
  70. {
  71. total = orderedSets * priceOfNum;
  72. Console.WriteLine("{0:f2} lv.", total);
  73. }
  74. }
  75. }
  76. }
  77. }
  78. }
  79. else
  80. {
  81. if (fruit == "Mango")
  82. {
  83. if (size == "small")
  84. {
  85. priceOfNum = 36.66 * 2;
  86. priceOfSets = orderedSets * priceOfNum;
  87. if (priceOfSets >= 400 && priceOfSets <= 1000)
  88. {
  89. total = priceOfSets - (priceOfSets * 0.15);
  90. Console.WriteLine("{0:f2} lv.", total);
  91. }
  92. else
  93. {
  94. if (priceOfSets > 1000)
  95. {
  96. total = priceOfSets - (priceOfSets * 0.5);
  97. Console.WriteLine("{0:f2} lv.", total);
  98. }
  99. else
  100. {
  101. if (priceOfSets < 400)
  102. {
  103. total = orderedSets * priceOfNum;
  104. Console.WriteLine("{0:f2} lv.", total);
  105. }
  106. }
  107. }
  108. }
  109. else
  110. {
  111. if (size == "big")
  112. {
  113. priceOfNum = 19.60 * 5;
  114. priceOfSets = orderedSets * priceOfNum;
  115. if (priceOfSets >= 400 && priceOfSets <= 1000)
  116. {
  117. total = priceOfSets - (priceOfSets * 0.15);
  118. Console.WriteLine("{0:f2} lv.", total);
  119. }
  120. else
  121. {
  122. if (priceOfSets > 1000)
  123. {
  124. total = priceOfSets - (priceOfSets * 0.5);
  125. Console.WriteLine("{0:f2} lv.", total);
  126. }
  127. else
  128. {
  129. if (priceOfSets < 400)
  130. {
  131. total = orderedSets * priceOfNum;
  132. Console.WriteLine("{0:f2} lv.", total);
  133. }
  134. }
  135. }
  136. }
  137. }
  138. }
  139. else
  140. {
  141. if (fruit == "Pineapple")
  142. {
  143. if (size == "small")
  144. {
  145. priceOfNum = 42.10 * 2;
  146. priceOfSets = orderedSets * priceOfNum;
  147. if (priceOfSets >= 400 && priceOfSets <= 1000)
  148. {
  149. total = priceOfSets - (priceOfSets * 0.5);
  150. Console.WriteLine("{0:f2} lv.", total);
  151. }
  152. else
  153. {
  154. if (priceOfSets > 1000)
  155. {
  156. total = priceOfSets - (priceOfSets * 0.5);
  157. Console.WriteLine("{0:f2} lv.", total);
  158. }
  159. else
  160. {
  161. if (priceOfSets < 400)
  162. {
  163. total = orderedSets * priceOfNum;
  164. Console.WriteLine("{0:f2} lv.", total);
  165. }
  166. }
  167. }
  168. }
  169. else
  170. {
  171. if (size == "big")
  172. {
  173. priceOfNum = 24.80 * 5;
  174. priceOfSets = orderedSets * priceOfNum;
  175. if (priceOfSets >= 400 && priceOfSets <= 1000)
  176. {
  177. total = priceOfSets - (priceOfSets * 0.5);
  178. Console.WriteLine("{0:f2} lv.", total);
  179. }
  180. else
  181. {
  182. if (priceOfSets > 1000)
  183. {
  184. total = priceOfSets - (priceOfSets * 0.5);
  185. Console.WriteLine("{0:f2} lv.", total);
  186. }
  187. else
  188. {
  189. if (priceOfSets < 400)
  190. {
  191. total = orderedSets * priceOfNum;
  192. Console.WriteLine("{0:f2} lv.", total);
  193. }
  194. }
  195. }
  196. }
  197. }
  198. }
  199. else
  200. {
  201. if (fruit == "Raspberry")
  202. {
  203. if (size == "small")
  204. {
  205. priceOfNum = 20 * 2;
  206. priceOfSets = orderedSets * priceOfNum;
  207. if (priceOfSets >= 400 && priceOfSets <= 1000)
  208. {
  209. total = priceOfSets - (priceOfSets * 0.5);
  210. Console.WriteLine("{0:f2} lv.", total);
  211. }
  212. else
  213. {
  214. if (priceOfSets > 1000)
  215. {
  216. total = priceOfSets - (priceOfSets * 0.5);
  217. Console.WriteLine("{0:f2} lv.", total);
  218. }
  219. else
  220. {
  221. if (priceOfSets < 400)
  222. {
  223. total = orderedSets * priceOfNum;
  224. Console.WriteLine("{0:f2} lv.", total);
  225. }
  226. }
  227. }
  228. }
  229. else
  230. {
  231. if (size == "big")
  232. {
  233. priceOfNum = 15.20 * 5;
  234. priceOfSets = orderedSets * priceOfNum;
  235. if (priceOfSets >= 400 && priceOfSets <= 1000)
  236. {
  237. total = priceOfSets - (priceOfSets * 0.5);
  238. Console.WriteLine("{0:f2} lv.", total);
  239. }
  240. else
  241. {
  242. if (priceOfSets > 1000)
  243. {
  244. total = priceOfSets - (priceOfSets * 0.5);
  245. Console.WriteLine("{0:f2} lv.", total);
  246. }
  247. else
  248. {
  249. if (priceOfSets < 400)
  250. {
  251. total = orderedSets * priceOfNum;
  252. Console.WriteLine("{0:f2} lv.", total);
  253. }
  254. }
  255. }
  256. }
  257. }
  258. }
  259. }
  260. }
  261. }
  262. }
  263. }
  264. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement