<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Java program to print the prime numbers	</title>
	<atom:link href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 04 Jul 2015 14:17:32 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>
		By: Kceejones		</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/comment-page-1/#comment-116057</link>

		<dc:creator><![CDATA[Kceejones]]></dc:creator>
		<pubDate>Sat, 04 Jul 2015 14:17:32 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=852#comment-116057</guid>

					<description><![CDATA[Pls i need a program to input the number of sentence and then display:word and it frequecy]]></description>
			<content:encoded><![CDATA[<p>Pls i need a program to input the number of sentence and then display:word and it frequecy</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ashish		</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/comment-page-1/#comment-110967</link>

		<dc:creator><![CDATA[ashish]]></dc:creator>
		<pubDate>Fri, 12 Jun 2015 17:45:10 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=852#comment-110967</guid>

					<description><![CDATA[Its a wrong code.....]]></description>
			<content:encoded><![CDATA[<p>Its a wrong code&#8230;..</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: girija		</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/comment-page-1/#comment-103926</link>

		<dc:creator><![CDATA[girija]]></dc:creator>
		<pubDate>Sun, 17 May 2015 14:44:32 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=852#comment-103926</guid>

					<description><![CDATA[public class Checkprime {
	public  boolean prime(int num){
		for(int i=2;i&#060;=num-1;i++){
			if(num%i==0){
				return false;
			}
		}
		
		return true;
		
	}

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
System.out.println(&#034;enter the range&#034;);
int range = scn.nextInt();
Checkprime p = new Checkprime();
for(int j=0;j&#060;=range;j++){
	if(p.prime(j)){
		System.out.println(j);
		
	}
}
	}

}]]></description>
			<content:encoded><![CDATA[<p>public class Checkprime {<br />
	public  boolean prime(int num){<br />
		for(int i=2;i&lt;=num-1;i++){<br />
			if(num%i==0){<br />
				return false;<br />
			}<br />
		}</p>
<p>		return true;</p>
<p>	}</p>
<p>	public static void main(String[] args) {<br />
		Scanner scn = new Scanner(System.in);<br />
System.out.println(&quot;enter the range&quot;);<br />
int range = scn.nextInt();<br />
Checkprime p = new Checkprime();<br />
for(int j=0;j&lt;=range;j++){<br />
	if(p.prime(j)){<br />
		System.out.println(j);</p>
<p>	}<br />
}<br />
	}</p>
<p>}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Utkarsh		</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/comment-page-1/#comment-48981</link>

		<dc:creator><![CDATA[Utkarsh]]></dc:creator>
		<pubDate>Sat, 15 Nov 2014 14:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=852#comment-48981</guid>

					<description><![CDATA[Please email me this programme for blue j]]></description>
			<content:encoded><![CDATA[<p>Please email me this programme for blue j</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Manan		</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/comment-page-1/#comment-10170</link>

		<dc:creator><![CDATA[Manan]]></dc:creator>
		<pubDate>Sat, 21 Sep 2013 11:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=852#comment-10170</guid>

					<description><![CDATA[import java.io.*;
import java.util.*;

class prime
{
public static void main(String args[])throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

/* Check if a number is prime or not */
int x=0;
int n,m;

System.out.print(&quot;Enter a no. : &quot;);
n= Integer.parseInt(br.readLine());

for(int i=2; i&#060;=n/2; i++)
{
m = n%i;
if(m==0)
{ x++; }
}
if(x==0)
System.out.println(&#034;The number is a prime no. &#034;);
else System.out.println(&#034;It is not prime no. &#034;);


/* Print List of prime nos. till N&#039;th number */

int a,b;
int c;
int d;
System.out.println(&#034;Enter number till which you want prime no.:&#034;);
d= Integer.parseInt(br.readLine());

for(a=2;a&#060;d;a++)
{
c=0;
for(b=2;b&#060;a;b++)
{
if((a%b)==0)
{
c=1;
}
}
if(c==0)
{ 
System.out.print(a+&#034; &#034;);
}
}

}}]]></description>
			<content:encoded><![CDATA[<p>import java.io.*;<br />
import java.util.*;</p>
<p>class prime<br />
{<br />
public static void main(String args[])throws IOException<br />
{<br />
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));</p>
<p>/* Check if a number is prime or not */<br />
int x=0;<br />
int n,m;</p>
<p>System.out.print(&#8220;Enter a no. : &#8220;);<br />
n= Integer.parseInt(br.readLine());</p>
<p>for(int i=2; i&lt;=n/2; i++)<br />
{<br />
m = n%i;<br />
if(m==0)<br />
{ x++; }<br />
}<br />
if(x==0)<br />
System.out.println(&quot;The number is a prime no. &quot;);<br />
else System.out.println(&quot;It is not prime no. &quot;);</p>
<p>/* Print List of prime nos. till N&#039;th number */</p>
<p>int a,b;<br />
int c;<br />
int d;<br />
System.out.println(&quot;Enter number till which you want prime no.:&quot;);<br />
d= Integer.parseInt(br.readLine());</p>
<p>for(a=2;a&lt;d;a++)<br />
{<br />
c=0;<br />
for(b=2;b&lt;a;b++)<br />
{<br />
if((a%b)==0)<br />
{<br />
c=1;<br />
}<br />
}<br />
if(c==0)<br />
{<br />
System.out.print(a+&quot; &quot;);<br />
}<br />
}</p>
<p>}}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Harsh		</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/comment-page-1/#comment-9795</link>

		<dc:creator><![CDATA[Harsh]]></dc:creator>
		<pubDate>Wed, 22 May 2013 11:46:48 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=852#comment-9795</guid>

					<description><![CDATA[Java source code to print prime unique numbers between two limits.
import java.io.*;
class primeUniqueNo
{
static int check(int a)
{
int b;
for(b = 2; b &#060;= a/2; b++)
{
if(a%b==0)
{
return 0;
}
}
return 1;
}
long countDigits(long no)
{
return String.valueOf(no).length();
}
boolean checkUnique(long n)
{
int nd = (int)countDigits(n);
long arr[] = new long[nd];
long copy = n;
int digit,term = 0;
while(copy!=0)
{
digit = (int)copy%10;
arr[term] = digit;
term++;
copy/=10;
}
for(int i = 0;i&#060;nd-1;i++)
{
for(int j = i+1;j&#060;nd;j++)
{
if(arr[i] == arr[j])
return false;
}
}
return true;
}
void main() throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println(&#034;Enter limits&#034;);
int n = Integer.parseInt(br.readLine());
int s = Integer.parseInt(br.readLine());
int count = 0; 
for(int i = n;i&#060;=s;i++)
{
if(checkUnique(i)==true)
{
if(check(i)==1)
{
System.out.print(i + &#034; &#034;);
count++;
}
}
}
System.out.println(&#034;&#034;);
System.out.println(count+&#034; prime unique number(s) had been found.&#034;);
}
}]]></description>
			<content:encoded><![CDATA[<p>Java source code to print prime unique numbers between two limits.<br />
import java.io.*;<br />
class primeUniqueNo<br />
{<br />
static int check(int a)<br />
{<br />
int b;<br />
for(b = 2; b &lt;= a/2; b++)<br />
{<br />
if(a%b==0)<br />
{<br />
return 0;<br />
}<br />
}<br />
return 1;<br />
}<br />
long countDigits(long no)<br />
{<br />
return String.valueOf(no).length();<br />
}<br />
boolean checkUnique(long n)<br />
{<br />
int nd = (int)countDigits(n);<br />
long arr[] = new long[nd];<br />
long copy = n;<br />
int digit,term = 0;<br />
while(copy!=0)<br />
{<br />
digit = (int)copy%10;<br />
arr[term] = digit;<br />
term++;<br />
copy/=10;<br />
}<br />
for(int i = 0;i&lt;nd-1;i++)<br />
{<br />
for(int j = i+1;j&lt;nd;j++)<br />
{<br />
if(arr[i] == arr[j])<br />
return false;<br />
}<br />
}<br />
return true;<br />
}<br />
void main() throws IOException<br />
{<br />
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));<br />
System.out.println(&quot;Enter limits&quot;);<br />
int n = Integer.parseInt(br.readLine());<br />
int s = Integer.parseInt(br.readLine());<br />
int count = 0;<br />
for(int i = n;i&lt;=s;i++)<br />
{<br />
if(checkUnique(i)==true)<br />
{<br />
if(check(i)==1)<br />
{<br />
System.out.print(i + &quot; &quot;);<br />
count++;<br />
}<br />
}<br />
}<br />
System.out.println(&quot;&quot;);<br />
System.out.println(count+&quot; prime unique number(s) had been found.&quot;);<br />
}<br />
}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ankit		</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/comment-page-1/#comment-9545</link>

		<dc:creator><![CDATA[ankit]]></dc:creator>
		<pubDate>Wed, 27 Feb 2013 06:29:39 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=852#comment-9545</guid>

					<description><![CDATA[import java.util.*;

class Prime
{
public static void main(String str[])
{

Scanner in=new Scanner(System.in);
System.out.println(&quot;Enter number upto which you want to find prime numbers: &quot;);
int n=in.nextInt();
System.out.println(&quot;The prime numbers are:&quot;);
for(int i=2;i&#060;=n;i++)
{
int k=0;
for(int j=2;j&#060;=i;j++)
{
if(i%j==0){
              k=k+1;        
                }
}
if(k==1){
             System.out.println(i);
            }

}


}
}]]></description>
			<content:encoded><![CDATA[<p>import java.util.*;</p>
<p>class Prime<br />
{<br />
public static void main(String str[])<br />
{</p>
<p>Scanner in=new Scanner(System.in);<br />
System.out.println(&#8220;Enter number upto which you want to find prime numbers: &#8220;);<br />
int n=in.nextInt();<br />
System.out.println(&#8220;The prime numbers are:&#8221;);<br />
for(int i=2;i&lt;=n;i++)<br />
{<br />
int k=0;<br />
for(int j=2;j&lt;=i;j++)<br />
{<br />
if(i%j==0){<br />
              k=k+1;<br />
                }<br />
}<br />
if(k==1){<br />
             System.out.println(i);<br />
            }</p>
<p>}</p>
<p>}<br />
}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: madhu		</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/comment-page-1/#comment-9393</link>

		<dc:creator><![CDATA[madhu]]></dc:creator>
		<pubDate>Wed, 09 Jan 2013 06:21:55 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=852#comment-9393</guid>

					<description><![CDATA[class prime should have its own identification]]></description>
			<content:encoded><![CDATA[<p>class prime should have its own identification</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: mallo		</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-print-the-prime-numbers/comment-page-1/#comment-3565</link>

		<dc:creator><![CDATA[mallo]]></dc:creator>
		<pubDate>Fri, 05 Nov 2010 12:02:28 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=852#comment-3565</guid>

					<description><![CDATA[its not worling n blue j]]></description>
			<content:encoded><![CDATA[<p>its not worling n blue j</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
