Advertisement
dragonbs

FishTank

Sep 15th, 2022
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _09.FishTank
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int lenght = int.Parse(Console.ReadLine());
  10.             int width = int.Parse(Console.ReadLine());
  11.             int height = int.Parse(Console.ReadLine());
  12.             double percent = double.Parse(Console.ReadLine());
  13.  
  14.             double aquariumVolume = lenght * width * height;
  15.             double volumeInLiters = aquariumVolume * 0.001;
  16.             double litersNeeded = volumeInLiters * (1 - percent / 100);
  17.  
  18.             Console.WriteLine(litersNeeded);
  19.         }
  20.     }
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement