Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _08.FishTank
- {
- class Program
- {
- static void Main(string[] args)
- {
- //обем на аквариума -> ok
- // колко литра събира аквариума = обем на аквариума * 0.001 (или / 1000)
- //процент от акавариума е зает
- //колко литра ни трябват за да го напълним = литра събира аквариума * (1 - процент заетост)
- int length = int.Parse(Console.ReadLine());
- int width = int.Parse(Console.ReadLine());
- int height = int.Parse(Console.ReadLine());
- double percent = double.Parse(Console.ReadLine());
- int volume = length * width * height;
- double volumeLiters = volume * 0.001;
- double percentInNumber = percent / 100;
- double needLiters = volumeLiters * (1 - percentInNumber);
- Console.WriteLine($"{needLiters:F3}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement