I am doing this plinko lab. If you don't know what plinko is, here is the picture : http://www.hoytcompany.com/images/games/plinko.jpg

Multiple chips are inserted into one slot and each ship is supposed to randomly fall onto random winning amount. I did best I could to apply randomness into this but for some reason, each time I run multiple chip function, i always get same winning amount. Here is the big chunk of my code:

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960`` ``````//If the user has chosen option "1": void drop_multiple() { double total_amount = 0; int number_of_chips = 0; int starting_slot = -1; int current_position = -1; const int TOTAL_LEVELS = 13; int shift = rand() % 2; srand(time(0)); cout << "How many chips?: "; cin >> number_of_chips; cout << endl; if(number_of_chips < 0) cout << number_of_chips << " is an invalid entry." << endl; else { cout << "Enter slot number: "; cin >> starting_slot; if(starting_slot < 0 || starting_slot > 8) cout << "Invalid Entry." << endl; else { for(int i = 0; i < number_of_chips; i++) //loop for every chip dropped in starting_slot { current_position = starting_slot; //resets bounce back and forth for each chip for(int j = 0; j < TOTAL_LEVELS; j++) { shift = rand() % 2; // Moves token right or left if(shift == 0) current_position = current_position - 0.5; else if(shift == 1) current_position = current_position + 0.5; // Checks bounds if(current_position <= 0) current_position = 0.5; else if(current_position >= 8) current_position = 7.5; } // end inner for loop total_amount = total_amount + calc_amount(current_position); // totals and adds earnings for where the chip lands according to the calc_amount function } // end outer for loop } // end inner else } // end outer else if(total_amount <= 0) { cout << "\nSorry, you didn't earn any money! Please try again." << endl; } else { cout << "\nThe average of winning amount is: \$"<< total_amount / double(number_of_chips) << endl; //notice that this is integer division cout << "Congrats! You have earned total: \$" << total_amount << endl; } } // end function ``````