> Write an expression? that attempts to read a double? value? from standard input and store? it in an double?variable?, x?

Write an expression? that attempts to read a double? value? from standard input and store? it in an double?variable?, x?

Posted at: 2014-12-18 
Homework questions should be answered by the student. Make an effort and do it yourself

import java.util.Scanner;

public class Example {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

double x;

System.out.print("Enter double: ");

x = sc.nextDouble();

System.out.println("The value of x: " + x);

}

}