Created
May 29, 2017 04:06
-
-
Save iamvon/5c2e3d030090b9e444aa7e44b1aebd1e 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 <iostream> | |
| #include <cstdlib> | |
| #include <ctime> | |
| using namespace std; | |
| static const char chuoikytu [] = | |
| "0123456789" | |
| "abcdefghijklmnopqrstuvwxyz" | |
| "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
| "!@#$%^&/?()_-+;:.•|~×÷`" ; | |
| int size = sizeof(chuoikytu) - 1; | |
| int main() | |
| { | |
| int length = 8; | |
| srand(time(0)); | |
| for (int i = 0; i < length; i++) | |
| { | |
| cout << chuoikytu [rand() % size]; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment