Question: My code:The volume is 125.6637 Correct code:The volume is 125.6640 4. Cylinder Base Area and Volumn saved The following is a sample run: 3.5 20.6

 My code:The volume is 125.6637 Correct code:The volume is 125.6640 4.

My code:The volume is 125.6637

Correct code:The volume is 125.6640

4. Cylinder Base Area and Volumn saved The following is a sample run: 3.5 20.6 Enter the radius and length of a cylinder: The base area is 38.4846 The volume is 792.7828 1 Full Screen Cylinder.Java New 1- import java.util.Scanner; public class Cylinder { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Enter the radius and length of a cylinder: "); double radius = in.nextDouble(); double length = in.nextDouble(); double area = Math.PI * radius * radius; double volume = Math.PI * radius * radius * length; System.out.printf("The base area is %.4f ", area); System.out.printf("The volume is %.4f ", volume); 16 17 } }

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!