Advertisement
IvetValcheva

09. Fish Tank

Mar 10th, 2024
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1.  
  2. int volume = int.Parse(Console.ReadLine())
  3.             * int.Parse(Console.ReadLine())
  4.             * int.Parse(Console.ReadLine());
  5.  
  6. double volumeInLiters = volume * 0.001;
  7.  
  8. double occupiedSpace = double.Parse(Console.ReadLine())/100;
  9.  
  10. double requiredLiters = volumeInLiters - volumeInLiters * occupiedSpace;
  11.  
  12. Console.WriteLine(requiredLiters);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement