Question: Imming I home > 2 . 7 : Floating - point ( double ) Testing with radius 5 . 5 Your value 6 9 6

Imming I home >2.7 : Floating-point (double)
Testing with radius 5.5
Your value
696.91
CHALLENGE
ACTIVITY
2.7.2: Floating-point numbers (double)
5280523482822.q32qy7
Jump to level 1
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 1.100, then the output is:
Radius is 1.100
Volume is 2.78764
Note: System out.printf() can be used with "%. Xf" to output a double to x digits after the decimal p
public class Hemisphere
public static void main (String[] args){
Scanner scnr = new Scanner(
System.in);
double hemisRadius;
double hemisvol;
hemisRadius = scnr . nextDouble () ;
hemisVol =(2.03.0)* Math.PI *(hemisRadius * hemisRadius * hemisRadius)
System.out.printf("Radius is "+("%.3f?
, hemisRadius);
System.out.printf("Volume is "+("%.", hemisvol);
System.out.print();
}
83
1
2
3
Check
Next level
 Imming I home >2.7 : Floating-point (double) Testing with radius 5.5

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!