Question: java The volume of a cylinder can be found using the formula V = arh where r is the radius and h is the height.

java java The volume of a cylinder can be found using the formula

The volume of a cylinder can be found using the formula V = arh where r is the radius and h is the height. Write a program using while that will repeatedly calculate the volume for several input values of h and r until a negative exit sentinel value is used. You may not use an if statement or break statement inside the while loop. You need to use the constant PI and set it equal to 3.14159. Sample Output: Enter height (Use negative to exit): 5 Enter radius: 3 The volume is Enter height (Use negative to exit): -20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!