Question: The program below incorrectly echoes the user's input to the output. Try submitting it for grading ( click Submit mode, then Submit for grading )
The program below incorrectly echoes the user's input to the output.
Try submitting it for grading click "Submit mode", then "Submit for grading" Notice that the test cases fail. The first test case's highlighting indicates that output and newline were not expected. In the second test case, the and newline were not expected.
Remove the code that echoes the user's input back to the output, and submit again. Now the test cases should all pass. import java.util.Scanner;
public class DoubleNum
public static void mainString args
Scanner scnrnew ScannerSystemin;
int x;
System.out.printlnEnter x: ;
xscnrnextInt;
System.out.printlnx;
System.out.printlnx doubled is: x;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
