I never noticed that I would have done;
int numbers[] = { 6,10,14,18,22 };
cout << numbers[ int(rand() % 5) ];