Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
132
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 ConsoleApplication
  4. {
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             int width = int.Parse(Console.ReadLine());
  10.             int lenght = int.Parse(Console.ReadLine());
  11.             double heightМ = double.Parse(Console.ReadLine());
  12.             double price = double.Parse(Console.ReadLine());
  13.             double weight = double.Parse(Console.ReadLine());
  14.  
  15.             double widthM = 2.0 * width + 2.0 * lenght;
  16.  
  17.             Console.WriteLine(widthM);
  18.             Console.WriteLine("{0:f2}", price * widthM);
  19.             Console.WriteLine("{0:f3}", heightМ * widthM * weight);
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement