Question: QUESTION 16 See the incomplete code provided below and write your answers for the blank areas so that the code should be able to read

 QUESTION 16 See the incomplete code provided below and write your

QUESTION 16 See the incomplete code provided below and write your answers for the blank areas so that the code should be able to read the user's input (an integer value) from the keyboard and cou how many negative and how many positive integers are entered by the user. The loop should stop when the user enters zero. Then print the count of negative numbers and the count of positive numbers with appropriate labels (1). (2). (3), (4), (5) are the blank parts what you are expected to write your answers. import java.util.Scanner; public class Exam1 public static void main(String[] args) Scanner sc = new Scanner (System.in); int userInput, countsNeg = 0; count Pos = 0; System.out.println("Enter an integer number : "); userInput- ; // (1) while ) // (2) if( userInput > 0) ; // (3) else (4) System.out.println("Enter another integer number or 0 to quit: "); user Input = ; // (5) 11 System.out.println("You have entered " + count Pos + positive numbers " + "and " + countsNeg + " negative numbers." ); For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac), B 1 U Paragraph Arial 14px A v I % da 6 2 Click Save and Submit to save and submit. Click Save All Answers to save all answers

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!