Create a program that will put the maximum element of the array in the first place (an array of 10 random integers).

program zz1;
var mas: array [1..10] of integer; // set up an array
i, k1, k2, max: integer; // set variables
begin
for i: = 1 to 10 do // write ten random numbers into the array
mas [i]: = random (21);
for i: = 1 to 10 do
write (mas [i], ”); // display the original array
writeln;
max: = 0; // set the initial value to the maximum
for i: = 1 to 10 do
if mas [i]> max then begin max: = mas [i]; k1: = i; end;
k2: = mas [1]; mas [1]: = max; mas [k1]: = k2; // put the maximum element first
for i: = 1 to 10 do
write (mas [i], ”); // display the resulting array
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.