Паскаль
program test;
uses crt;
const n=10;
var a,b:array [1..n] of integer;i:integer;
begin
clrscr;
randomize;
for i:=1 to n do
a[i]:= random(10);
for i:=1 to 10 do
write(a[i],' ');
writeln;
if i=n then b[n]:=a[1] else b[i]:=a[i+1];
write(b[i],' ');
readln;
end.
Паскаль
program test;
uses crt;
const n=10;
var a,b:array [1..n] of integer;i:integer;
begin
clrscr;
randomize;
for i:=1 to n do
a[i]:= random(10);
for i:=1 to 10 do
write(a[i],' ');
writeln;
for i:=1 to n do
if i=n then b[n]:=a[1] else b[i]:=a[i+1];
for i:=1 to 10 do
write(b[i],' ');
readln;
end.
ОТМЕТЬ КАК ЛУЧШЕЕ