begin
var n := ReadInteger('n =');
var a := ArrRandom(n, -10, 99);
a.Println;
var k := n div 2;
if n.IsEven then
a := a[k:] + a[:k]
else
a := a[k + 1:] + Arr(a[k]) + a[:k];
a.Println
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
begin
var n := ReadInteger('n =');
var a := ArrRandom(n, -10, 99);
a.Println;
var k := n div 2;
if n.IsEven then
a := a[k:] + a[:k]
else
a := a[k + 1:] + Arr(a[k]) + a[:k];
a.Println
end.