Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(1) import java.util.Scanner public class Main public static double Volume(double radius) { return 4/3.0Math.Pieradius*radiusradius; } public static void main(String args[]) { Scanner in = new

image text in transcribed
(1) import java.util.Scanner public class Main public static double Volume(double radius) { return 4/3.0"Math.Pieradius*radius"radius; } public static void main(String args[]) { Scanner in = new Scanner(System.in); double radius; System.out.print("Enter radius of sphere: "); radius = in.nextDouble(); System.out.printin("Volume of sphere: "+Volume(radius)); in.close(); (2) import java.util.Scanner; public class Main public static double Volume(double side) { return side side'side; > public static void main(String args[]) { Scanner in = new Scanner(System.in); double side; System.out.print("Enter side of cube: "); side = in.nextDouble(); System.out.println("Volume of cube: *+Volume(side)); in.close(); (3) import java.util.Scanner, public class Maint public static double Volume(double Length, double Width, double Height) { return 1/3.0*Length Width Height: } public static void main(String args[]) { Scanner in = new Scanner(System.in); double Length, Width, Height; System.out.print("Enter Length: "); Length = in.nextDouble(); System.out.print("Enter Width: "); Width = in.nextDouble(); System.out.print("Enter Height: "); Height = in.nextDouble(); System.out.println("Volume of pyramid: "+Volume(Length, Width, Height)); in.close (1) import java.util.Scanner public class Main public static double Volume(double radius) { return 4/3.0"Math.Pieradius*radius"radius; } public static void main(String args[]) { Scanner in = new Scanner(System.in); double radius; System.out.print("Enter radius of sphere: "); radius = in.nextDouble(); System.out.printin("Volume of sphere: "+Volume(radius)); in.close(); (2) import java.util.Scanner; public class Main public static double Volume(double side) { return side side'side; > public static void main(String args[]) { Scanner in = new Scanner(System.in); double side; System.out.print("Enter side of cube: "); side = in.nextDouble(); System.out.println("Volume of cube: *+Volume(side)); in.close(); (3) import java.util.Scanner, public class Maint public static double Volume(double Length, double Width, double Height) { return 1/3.0*Length Width Height: } public static void main(String args[]) { Scanner in = new Scanner(System.in); double Length, Width, Height; System.out.print("Enter Length: "); Length = in.nextDouble(); System.out.print("Enter Width: "); Width = in.nextDouble(); System.out.print("Enter Height: "); Height = in.nextDouble(); System.out.println("Volume of pyramid: "+Volume(Length, Width, Height)); in.close

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

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

Students also viewed these Databases questions

Question

=+ (c) Show that a ,, converges to some a > 0.

Answered: 1 week ago