By
Umesh
On
20/10/2014 03:27:26
Hello
Good Article
You can increase performance check number upto num/2 ..
then it will reduce time complexity by half time.
for(b=2;b<=a/2;b++)
{
if(a%b==0)
{
System.out.println("no. is not prime");
break;
}
}
Thanks
Umesh
Happy Coding