Write a program to read the bicycle wheel radius (a "double") the number of teeth on the front sprocket (an "int") and then to read repeatedly the number of teeth on a rear sprocket (an "int") and compute and print the effective radius until a value of zero is encountered.
At every calculation except the first, print the ratio of the newly computed effective radius to the previous effective radius.
MY problem is how i can use while loop in it to make it zero. well i m going to try different way to use while loop inside to get value zero and then get ratio to work. any help would be usefull.I m learning...as well so i will try just need guide line if its possible.

Thanks all for reading


public class BicycleGears {

public static void main(String[] argv)

{
double wheelRadius=0.0f;
float eftRadius=0.0f;
int frontSprocket=0;
int rearSprocket=0;
float pRadius=-0.0f;
double eftRadius1;
float ratio=0.00f;


//Prompt and read the number;
System.out.println ("Please enter the wheelRadius");
wheelRadius = UserInput.readDouble();
//produce an error message and end program
if(wheelRadius <= 0)
{
System.out.println("Error, invalid value");
System.exit(0);
}
//Prompt and read the number;
System.out.println("Please enter the frontSprocket");
frontSprocket = UserInput.readInt();
//produce an error message and end program

if(frontSprocket <= 0)
{
System.out.println("Error, invalid value");
System.exit(0);
}
//Prompt and read the number
System.out.println("Please enter the rearSprocket");
rearSprocket = UserInput.readInt();
//produce an error message and end program
if (rearSprocket <= 0)
{
System.out.println("Error, invalid value");
System.exit(0);
}


// calculation for radius
eftRadius1 = (wheelRadius*frontSprocket)/rearSprocket;

//print radius

----------------------------------error-----------------------------
do {
System.out.println("The effective radius for radius" + wheelRadius + "and sprockets" + frontSprocket + " and " + rearSprocket + " is " + eftRadius1 );

} while (eftRadius1 > 0);
System.out.println("The effective radius for radius" + wheelRadius + "and sprockets" + frontSprocket + " and " + rearSprocket + " is " + eftRadius1 );
eftRadius1--;
--------------------------error-----------------------------------------
its work fine & run up to zero value But its start my calculation from E.g ( The effective radius for radius 27.5 and sprockets 55 and 23 is 65.77 Right ) But its give me result from here
The effective radius for radius 27.5 and sprockets 55 and 23 is 42.77 ( Wrong )


//calculate and print ratio
ratio = eftRadius/pRadius;
System.out.println("ratio to previous " + ratio );
} // end of main

} // end class