Skip to content

Instantly share code, notes, and snippets.

@loochao
Created July 26, 2016 13:34
Show Gist options
  • Save loochao/9c3ca6b56cc48d54c5f84acb3d5569c7 to your computer and use it in GitHub Desktop.
Save loochao/9c3ca6b56cc48d54c5f84acb3d5569c7 to your computer and use it in GitHub Desktop.
Random generator in CPP
#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