class PrimeNumber {
public static void main (String args[])
{
int num=Integer.parseInt(args[0]);
int i,j;
for(i=1;i
{
for(j=2;j
{
int n=i%j;
if(n==0) {break;}
}
if(i==j)
{
System.out.print(" " + i);
}
}
}
}
No comments:
Post a Comment