Code:
public class Twins
{
public static void main(String args[])
{
int a,b,c;
a=1;
b=3;
for(c=2;c<=97;c++)
{
if(a%c==0&&b%c==0)
System.out.println(a+" and "+b+" are prime twins");
a++;
b++;
}
}
}
This was a program to find all the twin prime no.s till 100. It is compiling but when I right click and void main(), nothing happens. Can someone please help me.
Comment