Hi, I try to get different random numbers with srand(time(0)) then rand() but the problem is that the program do it million times within 1 second and return the same value 1 million times.(adsbygoogle = window.adsbygoogle || []).push({});

How could I obtain different values without sleeping the processor ?

Thanks

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# C, Random numbers within 1 second problem

Loading...

Similar Threads for Random numbers within |
---|

How to distinguish the decimal expansions of irrational numbers from random numbers? |

Pseudo Random Encryption? |

I need help decrypting this |

Python Writing numbers on the bars on a seaborn FacetGrid figure |

C/++/# How to check if a list of numbers is random? |

**Physics Forums | Science Articles, Homework Help, Discussion**