IvetValcheva

Fish Tank

Jan 10th, 2022
262
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._Fish_Tank
  4. {
  5.     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.  
  13.             double percent = double.Parse(Console.ReadLine());
  14.  
  15.             double volume = lenght* width* height;
  16.             double volumeInLiters = volume / 1000;
  17.  
  18.             double busy = percent / 100;
  19.  
  20.             double liters = volumeInLiters * (1 - busy);
  21.  
  22.             Console.WriteLine(liters);
  23.         }
  24.     }
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment