Advertisement
MARINA_GREBENAROVA

Beer And Chips

May 19th, 2019
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Bday2
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             int lenght = int.Parse(Console.ReadLine());
  11.             int width = int.Parse(Console.ReadLine());
  12.             int height = int.Parse(Console.ReadLine());
  13.             double percent = double.Parse(Console.ReadLine());
  14.  
  15.             int volume = lenght * width * height;
  16.  
  17.             double totalLiters = volume * 0.001;
  18.             double totalPercent = percent * 0.01;
  19.  
  20.             double TotalLiters = totalLiters * (1 - totalPercent);
  21.  
  22.             Console.WriteLine($"{TotalLiters:F3}");
  23.         }
  24.  
  25.     }
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement