Advertisement
VladoG

PB-BG - Oct 2018 -10. Birthday (not included in final score)

Oct 14th, 2018
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Birthday
  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 high = int.Parse(Console.ReadLine());
  12.             double percent = double.Parse(Console.ReadLine());
  13.  
  14.             int vol = lenght * width * high; // sm3
  15.             double volumeL = vol * 0.001; // L
  16.             percent = percent * 0.01;
  17.  
  18.             double realVol = volumeL * (1 - percent);
  19.  
  20.             Console.WriteLine("{0:F3}", realVol);
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement