0
Why is rand () returning same numbers ?
when i try rand () function it returns 41 just like sololearn example in functions chapter. why are they same ? it should be randoming numbers?
1 Resposta
+ 3
you have to use srand function before using rand.
example:
srand((unsigned)time(0));
rand() % 50;