Texts:
1. import java.util.Scanner;
2. public class DoubleNum
3. public static void main(String[] args) {
4. Scanner scnr = new Scanner(System.in);
5. int x;
6.
7. System.out.println("Enter x: ");
8. x = scnr.nextInt();
9.
10. System.out.println();
11. // Student mistakenly is echoing the input to output to match example
12. System.out.println("x doubled is: " + (2 * x));
13.
14. }
DoubleNum.java
Load default temp
Run your program as often as you'd like, before submitting for grading. Below, type any input values in the first box, then click Run program and observe the program's output in the second box.
DoubleNum.java
Load default temp
1. import java.util.Scanner;
2. public class DoubleNum
3. public static void main(String[] args) {
4. Scanner scnr = new Scanner(System.in);
5. int x;
6.
7. System.out.println("Enter x: ");
8. x = scnr.nextInt();
9.
10. System.out.println();
11. // Student mistakenly is echoing the input to output to match example
12. System.out.println("x doubled is: " + (2 * x));
13.
14. }
Develop mode
Submit mode
Run your program as often as you'd like, before submitting for grading. Below, type any input values in the first box, then click Run program and observe the program's output in the second box.
Enter program input (optional)
If your code requires input values, provide them here.