Advertisement
Niicksana

Birthday

Dec 10th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 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 _1.Birthday
  8. {
  9.     class Birthday
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             // Exam - 17 September 2017
  14.             int length = int.Parse(Console.ReadLine());
  15.             int width = int.Parse(Console.ReadLine());
  16.             int height = int.Parse(Console.ReadLine());
  17.             double percentage = double.Parse(Console.ReadLine());
  18.  
  19.             double volume = length * width * height;
  20.             double totalLiters = volume * 0.001;
  21.  
  22.             double realLiters = totalLiters - (totalLiters * (percentage / 100));
  23.  
  24.             Console.WriteLine("{0:f3}", realLiters);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement