Advertisement
Somo4k

01.PoolDay

Jun 15th, 2021
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _01.PoolDay
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int people = int.Parse(Console.ReadLine());
  10. double entryTax = double.Parse(Console.ReadLine());
  11. double bedTax = double.Parse(Console.ReadLine());
  12. double umbrellaTax = double.Parse(Console.ReadLine());
  13.  
  14. double totalTax = people * entryTax;
  15. double totalBedTax = (Math.Ceiling(people * 0.75)) * bedTax;
  16. double totalUmbrellaTax = (Math.Ceiling(people * 0.50)) * umbrellaTax;
  17.  
  18. double endPrice = totalTax + totalBedTax + totalUmbrellaTax;
  19.  
  20. Console.WriteLine($"{endPrice:f2} lv.");
  21. }
  22. }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement