The following code outputs a random number each second:
int main () { srand(time(NULL)); // Seeds number generator with execution time. while (true)
See man 3 rand -- you need to scale by dividing by RAND_MAX to obtain the range [0, 1] after which you can multiply by 100 for your target range.
man 3 rand
RAND_MAX