I copied this example from the help pages, was quicker than writting my own...i've editted it for 10 (was 100 in the example)
Obviously replace printf with which ever use you need the numbers for
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void)
{
int i;
randomize();
printf("One random number from 0 to 9\n\n");
printf("%d\n", rand() % 10);
return 0;
}
=======
for 2000+ use
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void)
{
int i;
randomize();
printf("2000 random numbers from 0 to 9\n\n");
for(i=0; i<2000; i++)
printf("%d\n", rand() % 10);
return 0;
}
=======
for numbers between 10 -> 20 use ===> (rand() % 10) + 10;