Create a table of integer positive numbers, even A, a number of N positions (N = known) in which values will be entered in the interval [0-99] with the necessary validity checks.
Considering a known number M (M> 100):
1. Create two new Tables B and C:
a. Table B will include those positions in the original table in which the sum of the data becomes greater than M. When such a position is located, the calculations for the remainder of the table will be made from the beginning, including the current position.
b. Table C will include the corresponding values of the sums as they arise from the relative process.
2. Display the contents of Tables B and C as well as the mean value of the elements in Table C.
Example: for N=14,M=110
Initial array A:
New array B:
11+45+20+32+99=207>110, 99+34=133>110, 34+27+77=138>110 etc
New array C: