Java Program to Find Volume of Cylinder
import java.util.*;
public class Main
{
public static void main(String args[])
{
//height of cylinder declared
int height=8;
//radius of cylinder declared
int radius=5;
//pie vlaue declared
double pie=3.14285714286;
//calculating volume of cylinder
double volume = pie * radius * radius * height;
System.out.println("Volume of cylinder="+volume);
}
}
Output:
Volume of cylinder=628.5714285720001
