const N = 10;
var
a: array[1..N] of integer;
i: byte;
b: integer;
begin
for i:=1 to N do
read(a[i]);
for i:=1 to N div 2 do begin
b := a[i];
a[i] := a[N-i+1];
a[N-i+1] := b;
end;
write(a[i],' ');
writeln;
end.
Объяснение:
const N = 10;
var
a: array[1..N] of integer;
i: byte;
b: integer;
begin
for i:=1 to N do
read(a[i]);
for i:=1 to N div 2 do begin
b := a[i];
a[i] := a[N-i+1];
a[N-i+1] := b;
end;
for i:=1 to N do
write(a[i],' ');
writeln;
end.
Объяснение: