An array of integers A (10) is given. Replace the odd-indexed elements with the minimum element.

program zz1;
const n = 10; // the number of elements is specified in the array
Var i, min: integer; // describe variables of integer type
Var a: array [1..n] of integer;

begin
for i: = 1 to n do // randomly write numbers into the array
a [i]: = random (201) -60;
for i: = 1 to n do // display numbers on the screen
write (a [i], ”);
writeln;

min: = 100000; // set the initial value for min
for i: = 1 to n do // organize an iteration of all the numbers in the array
if a [i] <min then min: = a [i]; // if the number from the array is less than the minimum, then write it to the minimum
writeln (‘minimum element =’, min);
for i: = 1 to n do
if i mod 2 = 1 then a [i]: = min;
for i: = 1 to n do // display the array on the screen
write (a [i], ”);
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.