int main()
{
int i,j;
for (i=1; i<=25; i++)
{
for (j=2; j<= i/2; j++)
if (!(i%j)) break;
if (j>i/2) cout << i << "\n";
}
return 0;
}
This program (not written by me) outputs the prime numbers from 1 to 25, including 1 even though 1 isnt prime.
I am having trouble with this line: if (!(i%j)) break;
Does this say "not modulus of i and j = 0?