Production and Quality Test
The production quantity of a product and the quantity of product discarded by the quality control are known for N in a number of hours (N = known). The production unit of the product wants the total rejected quantity not to exceed 20% of the total production quantity for the whole NW time period. However, several events do not allow the production to achieve the desired goal from the first hour of operation. For these reasons, the production manager wants to know the percentage of rejection of current total production for each hour.
Write a program in C language that will implement the following:
- Enter in two single-dimensional tables of integer positive N values values related to the production quantity and the corresponding waste quantity for N hours of production. The necessary validity checks must be made at import.
- Display on the screen the input values as well as the calculated values given in the example below until the time (if any) in which the total quantity of production disposed is for the first time less than 20% of the total production quantity.
|Current total production||100||250||390||470||580|
|Current total rejected production||25||70||105||110||113|
|percentage rejection %||25||28||27||23||19.5|