0)System.out.print In("Positive.");elseSystem.out.print in("Non-positive, converting to 1.");userNum = 1;System.out.print in("Final:+ userNum);Common student error: Changing the order of the...


Re-type the code and fix any errors. The code should convert non-positive numbers to 1.<br>if (userNum > 0)<br>System.out.print In(

Extracted text: Re-type the code and fix any errors. The code should convert non-positive numbers to 1. if (userNum > 0) System.out.print In("Positive."); else System.out.print in("Non-positive, converting to 1."); userNum = 1; System.out.print in("Final: + userNum); Common student error: Changing the order of the lines. You only need to fix the existing code. 1 import java.util.Scanner; 2 3 public class ConvertNegative ( public static void main (String I args) ( Scanner scnr new Scanner(System.in); int userNum; 6. 8. userNum scnr.nextInt(); V* Your solution goes here 11 12 13 } Run View your last submission 479 012m

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here