You need two utility functions. The first determines if a given number is prime or not. The second finds the next prime after a given number.
The following function can be used to determine if a given integer is prime:
bool is_prime (const unsigned num) {
if (num<2) return false;
if (0==(num%2)) return num==2;
unsigned max_factor = (unsigned) sqrt ((double) num) + 1;
unsigned factor;
for (factor=3; factor<max_factor; ++factor)
if (0==(num%factor)) return false;
return true;
}
The following function can be used to determine the next prime after the given integer:
unsigned next_prime (unsigned num) {
while (!is_prime (++num));
return num;
}
Now you can print a series of primes using the following:
int main (void) {
unsigned num=1;
while (num<10000) {
num = next_prime (num);
printf ("%d is prime\n", num);
}
return 0;
}
1097
There are eight such numbers.
10000
1229
999
there are 10 palindromic numbers between 9000 and 10000 9009,9119,9229,9339,9449,9559,9669,9779,9889,9999
1097
There are eight such numbers.
The square numbers integers between 576 and 10000 (and their square roots, in the left column) are: 245762562526676277292878429841309003196132102433108934115635122536129637136938144439152140160041168142176443184944193645202546211647220948230449240150250051260152270453280954291655302556313657324958336459348160360061372162384463396964409665422566435667448968462469476170490071504172518473532974547675562576577677592978608479624180640081656182672483688984705685722586739687756988774489792190810091828192846493864994883695902596921697940998960499980110010000
There is an infinity of numbers between 8500 and 10000. For example 8605+sqrt(2).
10000
9998.
1089
1229
999
If you mean strictly between , so that 1 and 10000 are both excluded, the answer is 38,888
Int(10000/3) = Int(3333.3) = 3333