program ms;
const n=10;
var
x:array[1..n] of integer;
i,c:integer;
begin
writeln('ishodnmassiv');
for i:=1 ton do read(x[i]);
writeln();
for i:=1 ton div 2 do begin
c:= x[i];
x[i]:=x[n+1-i];
x[n+1-i]:=c;
end;
writeln('obratnyimassiv');
for i:=1 ton do write(x[i],' ');
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
program ms;
const n=10;
var
x:array[1..n] of integer;
i,c:integer;
begin
writeln('ishodnmassiv');
for i:=1 ton do read(x[i]);
writeln();
for i:=1 ton div 2 do begin
c:= x[i];
x[i]:=x[n+1-i];
x[n+1-i]:=c;
end;
writeln('obratnyimassiv');
for i:=1 ton do write(x[i],' ');
end.