i am trying to write a program that finds all twin primes between 1 and 100. any suggestions?
#include <stdio.h>
#include "genlib.h"
#include "simpio.h"
int main()
{
int n1, n2, y, x;
printf("This program list all the twin primes.\n");
for (y = 3; y <= 98; y += 2)
{
if (3 % y != 0 && 5 % y != 0 && 7 % y != 0)
{
y = y;
}
for (x = 3; x <= 98; x += 2)
{
if (3 % x != 0 && 5 % x != 0 && 7 % x != 0)
{
x = x;
}
if(y = x + 2)
{
printf("(%d,%d)\n",x, y);
}
}
}
system("pause");
}