grach

2017_September_17 Birthday

Feb 26th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Birthday
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var lenght = double.Parse(Console.ReadLine());
  14.             var width = double.Parse(Console.ReadLine());
  15.             var height = double.Parse(Console.ReadLine());
  16.             var percent = double.Parse(Console.ReadLine());
  17.  
  18.             double volume = lenght * width * height;
  19.             double totaLiters = volume * 0.001;
  20.             double reaLiters = totaLiters * (1 - (percent*0.01));
  21.  
  22.             Console.WriteLine("{0:f3}" ,reaLiters);
  23.  
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment