Complete the code to output "Y is " followed by the value of y to three digits after the decimal point. On the next line, output "Y cubed is " followed by the value of yCubed to six digits after the decimal point. End with a newline.
Ex: If the input is 2.000, then the output is:
Y is 2.000 Y cubed is 8.000000
```java
import java.util.Scanner;
public class Cube {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
double y;
double yCubed;
y = scnr.nextDouble();
yCubed = y * y * y;
System.out.printf("Y is %.3f
", y);
System.out.printf("Y cubed is %.6f
", yCubed);
}
}
```