A few things come to my attention:
int n,p2,p3,p5,p7;
a[1]=n=p2=p3=p5=p7=1;
That's awful, what are you doing here?
You never increase n, so it will always write in the same element,
Besides: You declared 'a' as an array of 6000 ints, so there's no room for 2000000000 numbers.
What's the bracket for?
And that's just the tip of the iceberg, but before I continue:
Use
code tags and indent your code. Then as a
clear question about it.
[edit] And about
main() Last edited by Nick Evan; May 13th, 2008 at 8:38 am.
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Offline 4,132 posts
since Oct 2006