srand((int)time(NULL));for (int i = 1; i <= 10; i++) { int random = rand() % 3; //random is 0, 1 or 2 std::cout << random << ", ";}