Advertisement
vasilevaiva

Untitled

Apr 20th, 2019
528
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 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 _3
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string sizeEgg = Console.ReadLine();
  14. string colorEgg = Console.ReadLine();
  15. int partida = int.Parse(Console.ReadLine());
  16.  
  17. double total = 0;
  18. if ((sizeEgg == "Large") && (colorEgg == "Red"))
  19. {
  20. double pricePartida = partida * 16;
  21. double costs = 0.35 * pricePartida;
  22. total = pricePartida - costs;
  23. break;
  24.  
  25. }
  26. else if ((sizeEgg == "Medium") && (colorEgg == "Green"))
  27. {
  28. double pricePartida = partida * 9;
  29. double costs = 0.35 * pricePartida;
  30. total = pricePartida - costs;
  31.  
  32. break;
  33. }
  34. else if ((sizeEgg == "Small") && (colorEgg == "Yellow"))
  35. {
  36. double pricePartida = partida * 5;
  37. double costs = 0.35 * pricePartida;
  38. total = pricePartida - costs;
  39.  
  40. break;
  41. }
  42. Console.WriteLine($"{total:F2} leva.");
  43.  
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement