Question: C Programming With our ability to implement user-defined functions only the following will be permitted in the main function: 1. Declaration of variables to be

C Programming

With our ability to implement user-defined functions only the following will be permitted in the main function:

1. Declaration of variables to be passed to functions.

2. Calls to user-defined functions by main.

3. A limited amount of control structures (see chapters 5 and 6) to retain the previous two tasks within the main function. Additionally, each user-defined function may represent a single task in your larger program.

The failure to make a good use of user-defined functions as described here and in the course standards will result in a loss of ALL points on those assignments that require user-defined functions.

C Programming With our ability to implement user-defined functions only the following

Problem: An industrial facility is implementing a new processes which increases their rate of microprocessor unit production but there is some concern that the new process will generate a larger number of defective units. Given the percentage of defective units produced determine the probability that there will R defective units from a sample size of N In addition the program should calculate the probability that there will be no defective units from that same sample. Use Gosper's estimate (formula on right) for factorial where needed in your solution. Example Execution #1: Enter percentage of defective units produced: 20 Enter number of units to sample: 10 Enter number of defective units in sample: 2 Average number of defective units: 20% Selecting 10 units with 2 being defective has a probability of: 0.3024 Selecting 10 units with 0 being defective has a probability of: 0.1049 Example Execution #2: Enter percentage of defective units produced: 25 Enter number of units to sample: 10 Enter number of defective units in sample: 2 Average number of defective units: 25% Selecting 10 units with 2 being defective has a probability of: 0.2819 Selecting 10 units with 0 being defective has a probability of: 0.0550 Example Execution #3: Enter percentage of defective units produced: 15 Enter number of units to sample: 10 Enter number of defective units in sample: 2 Average number of defective units: 15% Selecting 10 units with 2 being defective has a probability of: 0.2763 Selecting 10 units with 0 being defective has a probability of: 0.1924 Example Execution #4: Enter percentage of defective units produced: 45 Enter number of units to sample: 10 Enter number of defective units in sample 10 Average number of defective units: 45% Selecting 10 units with 10 being defective has a probability of: 0.0003 Selecting 10 units with 0 being defective has a probability of 0.0025

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!