Created
July 26, 2016 13:34
-
-
Save loochao/9c3ca6b56cc48d54c5f84acb3d5569c7 to your computer and use it in GitHub Desktop.
Random generator in CPP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
#include <random> | |
#include <cstdlib> | |
srand(time(NULL)); | |
cout << RAND_MAX << endl; | |
cout << (double) rand() / RAND_MAX << endl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment