An array of 5 elements is given. Find the arithmetic mean of all the elements in the array.

program zz1;
var mas: array [1..5] of integer;
i, sum: integer;
begin
for i: = 1 to 5 do // enter 5 random numbers into an array from 0 to 20
mas [i]: = random (21);

for i: = 1 to 5 do // display the original array on the screen
write (mas [i], ”);
writeln; // go to a new line for output
for i: = 1 to 5 do // get the sum of array elements
sum: = sum + mas [i];
writeln (‘the arithmetic mean of all array elements =’, mas [i] / 5); // 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.