Lulunga

08. Fish Tank

Nov 22nd, 2020
451
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace Birthday
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.            double aquariumLength = double.Parse(Console.ReadLine());
  10.             double aquariumWidth = double.Parse(Console.ReadLine());
  11.             double aquariumHeigth = double.Parse(Console.ReadLine());
  12.             double percent = double.Parse(Console.ReadLine());
  13.  
  14.             double aquariumCapacity = aquariumHeigth * aquariumLength * aquariumWidth;
  15.             double totalLiters = aquariumCapacity * 0.001;
  16.             double calculatedPercent = percent * 0.01;
  17.             double litersNeeded = totalLiters * (1 - calculatedPercent);
  18.             Console.WriteLine("{0:F3}",litersNeeded);
  19.         }
  20.     }
  21. }
RAW Paste Data