By DePaul Dimadis
Choose your prefered Language: greek_flag uk_flag

The production of a product for N production periods (N = known) is recorded in a one-dimensional array of integer positive numbers A. Write a program in C language that:

  1. Will enter the data in Table A by performing all the necessary checks so that the numbers are positive.
  2. Will then create a new B table that will contain the current average value of the entered data in the corresponding positions.
  3. Will find and display how many and what periods the output differs by a maximum of 10% of the current average of the same period.


Period 1 2 3 4 5 6
Production 100 80 90 80 200 170
Current mean value 100 90 90 87.5 110 120
Difference <10% yes no yes yes no no