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(); + } +}