Question: Imming I home > 2 . 7 : Floating - point ( double ) Testing with radius 5 . 5 Your value 6 9 6
Imming I home : Floatingpoint double
Testing with radius
Your value
CHALLENGE
ACTIVITY
: Floatingpoint numbers double
Jump to level
Complete the code to output "Radius is "followed by the value of hemisRadius to three digits afte line, output "Volume is followed by the value of hemisVol to five digits after the decimal point. En
Ex: If the input is then the output is:
Radius is
Volume is
Note: System out.printf can be used with Xf to output a double to digits after the decimal
public class Hemisphere
public static void main String args
Scanner scnr new Scanner
System.in;
double hemisRadius;
double hemisvol;
hemisRadius scnr nextDouble ;
hemisVol Math.PI hemisRadius hemisRadius hemisRadius
System.out.printfRadius is
hemisRadius;
System.out.printfVolume is hemisvol;
System.out.print;
Check
Next level
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
