Question: Hello this is my code but I need to get a certain output not the one I currently have please help. Also this code is
Hello this is my code but I need to get a certain output not the one I currently have please help. Also this code is in java.


00 OU WNP 1 import java.util.Scanner; 2 3 public class DoubleNum { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); 6 int x; 8 9 10 System.out.println("Enter x: "); x = scnr.nextInt(); 11 12 13 14 } System.out.println(x); // Student mistakenly is echoing the input to output to match example System.out.println("x doubled is: " + (6 * x)); } Your output Enter x : 3 x doubled is: 6 Expected output Enter X: x doubled is: 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
