Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a main method that prompts the user for two doubles that are the radius and height of a cylinder. Calculate the volume and the

image text in transcribed

Write a main method that prompts the user for two doubles that are the radius and height of a cylinder. Calculate the volume and the area as given by following two equations, using Math.pow) and Math.PI and print the results. Print the results to one decimal place using DecimalFormat. Volume- Ttr2h Area 2rtrh Sample Output Enter Radius: 5.2 Enter Height: 8.1 Volume: 688.1 cubic inches. Surface Area: 264.6 square inches. LAB ACTIVITY 5.18.1: duringLab: Cylinder 0/2 Main.java Load default template... 1 public class Main { 2 public static void main(Stringt] args) * Type your code here. */

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions