#include <stdio.h>
int main(void)
{
int i=0,j=0,l=0;
printf("1 is a prime number\n");
printf("2 is a prime number\n");
for (i=3; i < 101; i=i+2)
{
l = 0;
// skip 1, don't go as high as i
for (j=2; j<i; j++)
{
if (i % j == 0)
{
l++;
// we already know it isn't prime
break;
}
}
if (l == 0)
{
printf("%d is a prime number\n", i);
}
}
return 0;
}