#include <iostream> #include <stdlib.h> int main() { srand(time(0)); const int randList[] = {1, 3, 4, 5, 6, 7, 8, 9, 10}; const int list_size = sizeof(randList) / sizeof(int); int index = rand() % list_size; int question = randList[index]; std::cout << question << std::endl; }