Program to print all prime numbers between 100 to 10000 or whatever given range.

class prime { public static void main() { int i,j,k; for(i=101;i<10000l;i++) //here you can give your own range { k=0; for(j=2;j<i;j++) { if(i%j==0) k++; } if(k==0) System.out.print(i+" "); } } }

#### OUTPUT:

Tags: bluej program to find the prime numbers between 100 to 1000, prime numbers for a given range.