Dan massia A, consisting of 12 numbers, fill the array with random numbers in the range from 0 to 100.

Dan massia A, consisting of 12 numbers, fill the array with random numbers in the range from 0 to 100. It is required to calculate the arithmetic mean of the array elements. print the array and the arithmetic mean to the screen.

program zz1;
const n = 12; // set the number of elements in the array
var i, k: integer; // set variables of integer type
m: array [1..n] of integer;
begin
for i: = 1 to n do // get 12 random numbers and write them into an array
m [i]: = random (101);
for i: = 1 to n do // display the resulting array on the screen
write (m [i], ”);
writeln; // go to a new line to display the response
for i: = 1 to n do // organize a loop in which we iterate over all the elements of the array
k: = k + m [i]; // get the sum by adding another element from the array to it
write (‘arithmetic mean of array elements =’, k / 12: 5: 2); // display the answer
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.