An array X [N] of integers is given. Without using other arrays, rearrange its elements in reverse order.

program zz1;
const n = 6; // set the number of elements in the array
var i, s: integer; // set variables of integer type
m: array [1..n] of integer;
begin
for i: = 1 to n do // write numbers in the array at random
m [i]: = random (46) -15;
for i: = 1 to n do // display the array on the screen
write (m [i], ”);
writeln;
for i: = 1 to n div 2 do // exchange array elements according to the principle of the first with the last, the second with the penultimate, etc.
begin s: = m [i]; m [i]: = m [n + 1-i]; m [n + 1-i]: = s; end;
for i: = 1 to n do // display the array on the screen
write (m [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.