// PascalABC.NET 3.1, сборка 1179 от 29.02.2016 begin var a:=ArrRandom(ReadInteger('n='),10,99); a.Println; var m:=a.Min; for var i:=0 to a.Length-1 do a[i]-=m; a.Println end.
Var a: array[1..100] of integer; n, min, i: integer; begin readln(n); for i := 1 to n do read(a[i]); min := a[1]; for i := 2 to n do if min > a[i] then min := a[i]; for i := 1 to n do a[i] := a[i] - min; for i := 1 to n do write(a[i], ' '); end.
begin
var a:=ArrRandom(ReadInteger('n='),10,99);
a.Println;
var m:=a.Min;
for var i:=0 to a.Length-1 do a[i]-=m;
a.Println
end.
Тестовое решение:
n= 13
90 37 52 21 77 74 75 75 43 98 92 16 90
74 21 36 5 61 58 59 59 27 82 76 0 74
begin
readln(n);
for i := 1 to n do
read(a[i]);
min := a[1];
for i := 2 to n do
if min > a[i] then
min := a[i];
for i := 1 to n do
a[i] := a[i] - min;
for i := 1 to n do
write(a[i], ' ');
end.