===== PascalABC.NET =====
begin
var n := ReadInteger('n =');
var a := ArrRandom(n, -99, 99);
a.Println;
var (min, max) := (a.Min, a.Max);
a := a.Where(p -> (p <> min) and (p <> max)).ToArray;
a.Println
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
===== PascalABC.NET =====
begin
var n := ReadInteger('n =');
var a := ArrRandom(n, -99, 99);
a.Println;
var (min, max) := (a.Min, a.Max);
a := a.Where(p -> (p <> min) and (p <> max)).ToArray;
a.Println
end.