Question: C LANGUAGE PROBLEM Question 27 (Programming) Suppose a basket contains one red ball and one white ball. You randomly choose one ball. If it is
C LANGUAGE PROBLEM

Question 27 (Programming) Suppose a basket contains one red ball and one white ball. You randomly choose one ball. If it is red you return it to the basket and add another red ball to the basket. If it is white you also return it and add another white ball to the basket Write a C program that simulates this process until there are 100 balls in the basket. Use an array of 100 values to keep track of each color that was added. The array could contain either integer or character values to represent the color of the balls Output the ratio of white balls to the total number of balls. You should not output any other values Hint: The probability of choosing a ball of a specific color changes depending on the number of balls currently in the basket
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
