Monday, 20 March 2017

to find volume of cylinder in java

class cylinder
{
public static void main(String args[])
{
float p,r,h;
float volume;
p=3.14;
r=5;
h=7;
volume=p*r*r*h;
System.out.println("The volume of cylinde ="+volume);
}
}

No comments:

Post a Comment