Created
October 21, 2016 04:40
-
-
Save BSVino/fedd455e1dc885db8c62396f42be67b1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 <random> | |
| int main(int argc, const char** args) | |
| { | |
| const int num_data = 255; | |
| unsigned char data[num_data]; | |
| srand(0); | |
| for (int k = 0; k < num_data; k++) { | |
| data[k] = (unsigned char)rand(); | |
| } | |
| for (int k = 0; k < num_data - 1; k++) { | |
| data[k] /= data[k + 1]; | |
| } | |
| return data[rand() % num_data]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment