Ok, I've already posted a thread about a prime number program, and I got a lot of help, thanks to all the people who responded. Now, I need to write another program involving prime numbers. I need to write a program using the following function which determines if a number is prime, and print all of the prime numbers from 1 to 10,000. I know I should use an array, but I'm a rookie at C programming and I can't quite get it correctly. Thanks.

.....code....

...printf( "%d are prime numbers.\n", x);

return 0;

}

//function checkprime definition

int checkprime(num){

int count, result;

if((num == 0) || (num < 0) || (num == 1))

return 2;

for( count = 2; count < num; count ++ ){

result = num % count;

if (result == 0)

return 0;

}

return 1;

}