Advertisement
Spocoman

11. Refactor Volume of Pyramid

Jan 16th, 2022
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. using System;
  2.  
  3. namespace RefactorVolumeOfPyramid
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double length = double.Parse(Console.ReadLine());
  10.             double widht = double.Parse(Console.ReadLine());
  11.             double height = double.Parse(Console.ReadLine());
  12.             double sum = (length * widht * height) / 3;
  13.             Console.WriteLine($"Length: Width: Height: Pyramid Volume: {sum:f2}");
  14.         }
  15.     }
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement