Advertisement
Icakman

Untitled

Dec 1st, 2019
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. using System.Linq;
  2. using System.Text;
  3. using System.Threading.Tasks;
  4.  
  5. namespace ConsoleApp1
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. double over20 = double.Parse(Console.ReadLine());
  12. double kg = double.Parse(Console.ReadLine());
  13. int days = int.Parse(Console.ReadLine());
  14. int lug = int.Parse(Console.ReadLine());
  15. double lugPr = 0;
  16. double total = lugPr * lug;
  17. double price = 0;
  18. if (kg > 20 && days >30)
  19. {
  20. lugPr = over20;
  21. price = total + total * 0.10;
  22. }
  23. else if (kg >= 10 && kg <= 20 && days >=7 && days <=30)
  24. {
  25. lugPr = over20 * 0.5;
  26. price = total + total * 0.15;
  27. }
  28. else if (kg < 10 && days<7)
  29. {
  30. lugPr = over20 * 0.2;
  31. price = total + total * 0.40;
  32. }
  33. Console.WriteLine($"The total price of bags is: {price} lv.");
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement