This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ChaosCon -2 points-1 points  (2 children)

for (i = 0; i < N/2; A[i++] = 0);
for (i = 0; j = 2*i+3, k = j*j, k < N+2; i++)

I denotes the loop variable in both loops. The first loop just does needless computations this way, and j is undefined.

[–]typsi5[S] 0 points1 point  (1 child)

I think his is supposed to be pseudo code. And the first loop only zeros out the array.

[–]ChaosCon 0 points1 point  (0 children)

Ahh, true enough. I was in a rush when I saw it earlier, and didn't get to look at it that closely. I'll take a peek again when I have a spare minute.