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.

Hello this is my code but I need to get a certainoutput not the one I currently have please help. Also this code

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

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!