I wrote this C code below, when I loop, it returns a random number. How can I achieve the 5 different random values if myrand() is executed?
#include
Try this:
#include #include int main(void) { for (int i = 0; i < 10; i++) { printf("%ld\n", (long)time(NULL)); } }
My "guess" is that 10 equal values will be printed :)