From 0c71a80b9cd6ba77b5894443c967f1c8272fa2b4 Mon Sep 17 00:00:00 2001 From: chaudharyaditya1 <101653565+chaudharyaditya1@users.noreply.github.com> Date: Thu, 20 Oct 2022 20:59:04 +0530 Subject: [PATCH] Create volume_of_cylinder.java --- volume_of_cylinder.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 volume_of_cylinder.java diff --git a/volume_of_cylinder.java b/volume_of_cylinder.java new file mode 100644 index 0000000..be2efeb --- /dev/null +++ b/volume_of_cylinder.java @@ -0,0 +1,22 @@ +import java.util.Scanner; +class VolumeOfCylinder +{ + public static void main(String args[]) + { + + Scanner s= new Scanner(System.in); + + System.out.println("Enter the radius:"); + double r=s.nextDouble(); + System.out.println("Enter the height:"); + double h=s.nextDouble(); + + double volume=((22*r*r*h)/7); + + System.out.println("volume of Cylinder is: " +volume); + + + + + } +}