begin
var a := SeqRandomReal(ReadInteger('n='), -10, 10)
.Select(t -> real(Round(t, 2))).ToArray;
a.Println;
var (imin, avg) := (a.IndexMin, a.Average);
a := a.Select((v, i)-> i < imin ? avg : a[i]).ToArray;
a.Println
end.
begin
var a := SeqRandomReal(ReadInteger('n='), -10, 10)
.Select(t -> real(Round(t, 2))).ToArray;
a.Println;
var (imin, avg) := (a.IndexMin, a.Average);
a := a.Select((v, i)-> i < imin ? avg : a[i]).ToArray;
a.Println
end.