Java Program To Count Positive, Zero and Negative Numbers
Java Program To Count Positive, Zero and Negative Numbers
To count the number of positive number, negative number, and zero from the given set of numbers
entered by the user, you have to first ask to the user to enter a set of numbers (10 numbers here) to
check all the number using for loop to count how many positive, negative, and zero present in the
provided set of numbers and display the output on the screen as shown in the following program.
Following Java Program ask the user to enter 10 number to check for the occurrence of positive
number, negative number and zero, then display the result on the screen:
import java.util.Scanner;
When the above Java Program is compile and executed, it will produce the following output:
You may also like to learn and practice the same program in other popular programming languages: