Prime Numbers List from 1 to n

Prime Numbers List from 1 to n

Here you will get the program code to print prime numbers list in java programming.

Program to print Prime Numbers List from 1 to n

Output

C:\CodeRevise\java>javac PrimeList.java

C:\CodeRevise\java>java PrimeList
Enter the Number’s upper limit (n): 45
Prime numbers from 1 to 45:
2 3 5 7 11 13 17 19 23 29 31 37 41 43

 

 

Check out our other Java Programming Examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top