| | |
Cylinder surface, area, height etc etc
![]() |
•
•
Join Date: Oct 2004
Posts: 15
Reputation:
Solved Threads: 0
Hi, im using a code snippet found on this website,
ylinderVolume
A simplistic program to compute the volume of a cylinder when its radius and length are input via MyInput.class
code snippet donated to daniweb by: cscgal ( all code snippets bycscgal )
views: 52
syntax language: java122
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));
}
}
i studied visual basic last semester at university very hard, and know im struggling again with java. Programming is the only module that i struggle with. All of the others, website management, ssadm i can do with ease but this is just imposible to me. So any help would be very appreciated. As well as the volume i have to calculate the surface are, set the height, set the radius of the base and set the center of the base.
Any ideas?
Many thanks.
ylinderVolume
A simplistic program to compute the volume of a cylinder when its radius and length are input via MyInput.class
code snippet donated to daniweb by: cscgal ( all code snippets bycscgal )
views: 52
syntax language: java122
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));
}
}
i studied visual basic last semester at university very hard, and know im struggling again with java. Programming is the only module that i struggle with. All of the others, website management, ssadm i can do with ease but this is just imposible to me. So any help would be very appreciated. As well as the volume i have to calculate the surface are, set the height, set the radius of the base and set the center of the base.
Any ideas?
Many thanks.
![]() |
Similar Threads
- Starting Python (Python)
- c++ computer surface area of an object (C++)
- Cone Formula (Java)
- Please help me figure out whats wrong with my code (C++)
- Help with C++ Classes (C++)
Other Threads in the Java Forum
- Previous Thread: casting error
- Next Thread: Unsure of where to put classpath for mail.jar
| Thread Tools | Search this Thread |
-xlint android api applet application array arrays automation bi binary blackberry block bluetooth chat class client code compile compiler component database developmenthelp eclipse error event fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide image int integer j2me j2seprojects java javac javaprojects jetbrains jni jpanel jtable julia learningresources lego linux list login loops mac main map method methods mobile myregfun netbeans newbie nonstatic notdisplaying number online pearl problem program programming project qt recursion scanner screen server set singleton sms sort spamblocker sql string swing system textfields thread threads time title tree tutorial-sample update variablebinding windows working xor






