Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Sandbox
- {
- class Program
- {
- static void Main(string[] args)
- {
- double width = double.Parse(Console.ReadLine());
- double lenght = double.Parse(Console.ReadLine());
- double sandPrice = double.Parse(Console.ReadLine());
- double boardPrice = double.Parse(Console.ReadLine());
- double sandArea = (width - 0.4) * (lenght - 0.4);
- double boardArea = width * lenght - sandArea;
- double sandNeeded = Math.Ceiling(sandArea * 20);
- double boardsNeeded = Math.Ceiling(boardArea / 0.44);
- double totalPrice = sandNeeded * sandPrice + boardsNeeded * boardPrice;
- Console.WriteLine($"{totalPrice:F2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement