From 1cfbf6aee64d3331b5f875db51af79523b8cd452 Mon Sep 17 00:00:00 2001 From: swayam khanduri <63970499+SWAYAMKHANDURI@users.noreply.github.com> Date: Sat, 7 Oct 2023 12:06:20 +0530 Subject: [PATCH] Create kwj4Yl.cs Signed-off-by: swayam khanduri <63970499+SWAYAMKHANDURI@users.noreply.github.com> --- eXxRyP/kwj4Yl.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 eXxRyP/kwj4Yl.cs diff --git a/eXxRyP/kwj4Yl.cs b/eXxRyP/kwj4Yl.cs new file mode 100644 index 0000000..f87b67b --- /dev/null +++ b/eXxRyP/kwj4Yl.cs @@ -0,0 +1,26 @@ +using System; +public class Prism { + + static void Calculate_vol() + { + // Initialization + double width, height, length, Vol; //declaring variables + Console.WriteLine("Enter width:"); + width = Convert.ToDouble(Console.Read());//taking input + Console.WriteLine("Enter height:"); + height = Convert.ToDouble(Console.Read());//taking input + Console.WriteLine("Enter height:"); + length = Convert.ToDouble(Console.Read());//taking input + + // Formula for calculating the area + Vol=width*height*length; + + // Displaying the area + Console.WriteLine("The volume of rectangular prism is : " + Vol); + Console.ReadKey(); + } + static public void Main(String[] args) + { + Calculate_vol(); + } +}