Java program that outputs the quantity of prime numbers

$10.00

Category:

Description

Write a Java program that outputs the quantity of prime numbers under an input number n which is inputted by the user. For example, if the user inputs 10, then the program outputs 4. Provide comments which explain how the algorithm works.