Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Create kwj4Yl.cs #1605

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions eXxRyP/kwj4Yl.cs
Original file line number Diff line number Diff line change
@@ -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();
}
}