Stuck again. could use some help from the community.
// This program accepts a height and a radius from the user
// It uses a subroutine to calculate the volume of the cone
// The formula is v = (3.14 * r * r * h)/3
public class Midterm
{
public void main(String args[])
{
double r;
int h;
String reply;
while(true)
{
System.out.print("Enter radius: ");
r = Keyboard.readInt();
system.out.print("Enter height: ");
h = keyboard.readInt;
System.out.println("The volume of the cone is: ") + CylVol);
System.out.print("Play again? (y/n) ");
reply = Keyboard.readDouble();
if(reply.equals("n"))
break;
}
static double CylVol(int v)
{
int vol;
Vol = (3.14 * r * r * h)/3;
return vol;
}
}
Errors;
--------------------Configuration: <Default>--------------------
\\filesvrcls\2011\stawil\Java\midterm.java:24: not a statement
System.out.println("The volume of the cone is: ") + CylVol);
^
\\filesvrcls\2011\stawil\Java\midterm.java:24: ';' expected
System.out.println("The volume of the cone is: ") + CylVol);
^
\\filesvrcls\2011\stawil\Java\midterm.java:36: illegal start of expression
static double CylVol(int v)
^
3 errors
Process completed.