int main()
{
cout << "Enter a number of chips: ";
double num_chips;
cin >> num_chips; // if user enters 5, drop 5 chips to every slot between 0 - 8
double num_chip_saver = num_chips; // preserves the initial entered value of chips to be used as a divisor in computing average chips
double a = multchip_slot(num_chips, 0);
double b = multchip_slot(num_chips, 1);
double c = multchip_slot(num_chips, 2);
double d = multchip_slot(num_chips, 3);
double e = multchip_slot(num_chips, 4);
double f = multchip_slot(num_chips, 5);
double g = multchip_slot(num_chips, 6);
double h = multchip_slot(num_chips, 7);
double i = multchip_slot(num_chips, 8);
double j = a + b + c + d + e + f + g + h + i; // sums the total points earned from each of the slots
cout << "Total points: " << j << endl;
cout << "Average points: " << j / num_chip_saver << endl; // computes the average points earned per drop
Additional info: The function returns "Total Points." My assignment is to create a program that enables users to drop multiple chips into all nine slots of a Plinko board simultaneously. In other words, if a user enters "5" as their number of chips (num_chips) value, it drops 5 chips into each of the nine slots, labeled 0-8. My assignment is to compute the total and average points earned from this.