Question: Given the following code: int deduction = 0; Scanner scan = new Scanner (System. in); System. out. println (Enter a negative nonzero number); deduction scan
Given the following code: int deduction = 0; Scanner scan = new Scanner (System. in); System. out. println ("Enter a negative nonzero number"); deduction scan next lnt(); Write this statement {System. out. println ("The number you entered is invalid. "); System. out. println("Enter a negative nonzero number"); deduction = scan nextInt();}//End While Assume that valid input data must be a negative nonzero number. Type the exact text for the line of Java that should replace Write this statement shown above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
