Advertisement
papun4o

Untitled

Sep 29th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 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 magazinche
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var product = Console.ReadLine();
  14. var city = Console.ReadLine();
  15. var quanty = Double.Parse(Console.ReadLine());
  16. if (city == "Sofia")
  17. {
  18. if (product == "coffee") { Console.WriteLine(quanty * 0.5); }
  19. else if (product == "water") { Console.WriteLine(quanty * 0.8); }
  20. else if (product == "beer") { Console.WriteLine(quanty * 1.2); }
  21. else if (product == "sweets") { Console.WriteLine(quanty * 1.45); }
  22. else if (product == "peanuts") {Console.WriteLine(quanty* 1.6);}
  23. }
  24. if (city == "Plovdiv")
  25. {
  26. if (product == "coffee") {Console.WriteLine(quanty * 0.4);}
  27. else if (product == "water") {Console.WriteLine(quanty * 0.7);}
  28. else if (product == "beer") {Console.WriteLine(quanty * 1.15);}
  29. else if (product == "sweets") {Console.WriteLine(quanty * 1.30);}
  30. else if (product == "peanuts") {Console.WriteLine(quanty * 1.50);}
  31. }
  32. if (city == "Varna")
  33. {
  34. if (product == "coffee") { Console.WriteLine(quanty * 0.45); }
  35. else if (product == "water") { Console.WriteLine(quanty * 0.7); }
  36. else if (product == "beer") { Console.WriteLine(quanty * 1.10); }
  37. else if (product == "sweets") { Console.WriteLine(quanty * 1.35); }
  38. else if (product == "peanuts") { Console.WriteLine(quanty * 1.55); }
  39. }
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement