ive done this so far,
but how do u keep the dice that i want and re roll the one i didnt keep?
Code:#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int nums[5]; int i, j, input; time_t t; int count[6]; srand(time(&t)); /* seed the random number generator */ for(j= 0; j < 14; j++) { for(i = 0; i < 5; i++) { nums[i] = rand()%6 + 1; cout << nums[i] << endl; switch(nums[i]) { case 1: ++count[0]; break; case 2: ++count[1]; break; case 3: ++count[2]; break; case 4: ++count[3]; break; case 5: ++count[4]; break; case 6: ++count[5]; break; default: cout << "An error has occured!"; break; } } cout << "Choose which numbers you want to keep?( -1 to keep all numbers ) \n"; "\n"; cin >> input; if(input == -1) break; if (input > 6) cout << "Please select number from 1 to 6 only \n"; '\n'; } if ( return 0; }