Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- #include <random>
- #include <string>
- using namespace std;
- int main() {
- string names[] = { "Stefan", "Gosho", "Petur", "Ivan" };
- minstd_rand generator(time(0));
- uniform_int_distribution<> dist(0, 3);
- cout << names[dist(generator)];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement