Advertisement
IvanITD

06.Repainting

Jan 14th, 2024
594
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | Source Code | 0 0
  1. int neededNaylonAmount = int.Parse(Console.ReadLine());
  2. int neededPaintAmount = int.Parse(Console.ReadLine());
  3. int thinnerAmount = int.Parse(Console.ReadLine());
  4. int hours = int.Parse(Console.ReadLine());
  5.  
  6.  
  7. double naylonPrice = (neededNaylonAmount + 2) * 1.50;
  8. double paintPrice = (neededPaintAmount + neededPaintAmount * 0.10) * 14.50;
  9. double thinnerPrice = thinnerAmount * 5.00;
  10.  
  11.  
  12. double bags = 0.40;
  13.  
  14. double totalExpence = naylonPrice + paintPrice + thinnerPrice + bags;
  15.  
  16. double workerPrice = hours * (totalExpence * 0.30);
  17.  
  18. double finalPrice = totalExpence + workerPrice;
  19.  
  20. Console.WriteLine(finalPrice);
  21.  
Tags: C#
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement