You are given an array A of N elements. Print all elements whose value is greater than the arithmetic

You are given an array A of N elements. Print all elements whose value is greater than the arithmetic mean of the elements of the array. Pascal language.

program zz1;
const n = 5; // set the number of elements in the array
var i, s, p: integer; // set variables of integer type
a: array [1..n] of integer;
begin
for i: = 1 to n do // get n random numbers and write them into an array
a [i]: = random (51);
for i: = 1 to n do // display the resulting array on the screen
write (a [i], ”);
writeln; // go to a new line to display the response
for i: = 1 to n do
s: = s + a [i]; // get the sum
p: = s div n; // get the arithmetic mean
for i: = 1 to n do
if a [i]> p then write (a [i], ”); // 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.