Find the arithmetic mean of the minimum and maximum elements of 10 entered (Pascal)

program zz1;

var a, b, min, i, max: integer; // set variables of integer type

begin

min: = 10000; max: = 0; // set initial values for maximum and minimum

for i: = 1 to 10 do

begin

read (a); // enter the number

if a> max then max: = a; // check if the number is greater than the maximum, then write it to the maximum

if a <min then min: = a; // check if the number is less than the minimum, then write it to the minimum

end;

write (‘arithmetic mean of minimum and maximum elements =’, (max + min) / 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.