Start New Discussion within our Software Development Community

A simplistic program to compute the volume of a cylinder when its radius and length are input via MyInput.class

package cylindervolume;
public class CylinderVolume
public static void main(String args[])
double pi = 3.14;
double radius, length;
System.out.print("Please enter radius of cylinder: ");
radius = MyInput.readDouble();
System.out.print("Please enter length of cylinder: ");
length = MyInput.readDouble();
System.out.print("Volume = " + (radius*radius*pi*length));

While pursuing a Computer Science degree, I founded, an online community for developers and IT professionals. I coded the backend platform from the ground up and I also do all of the advertising sales and SEO. I'm a super-geeky programmer with a passion for Internet marketing.

The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.