===== PascalABC.NET =====
begin
// 1
var a := ReadArrInteger(10);
a.Transform(p -> 5 * p);
a.Println;
a.Aggregate(BigInteger.One, (u, v) -> u * v).Println;
// 2
var b := ReadArrInteger(6);
b.Count(p -> (p > 0) and p.InRange(1, 9)).Println;
// 3
var c := ReadArrInteger(8);
c.Where(p -> (p mod 10 = 0) and p.InRange(150, 250)).Println
.Sum.Println;
// 4
var d := ReadArrInteger(5);
d.Where(p -> p mod 10 = 4).Min.Println
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
===== PascalABC.NET =====
begin
// 1
var a := ReadArrInteger(10);
a.Transform(p -> 5 * p);
a.Println;
a.Aggregate(BigInteger.One, (u, v) -> u * v).Println;
// 2
var b := ReadArrInteger(6);
b.Count(p -> (p > 0) and p.InRange(1, 9)).Println;
// 3
var c := ReadArrInteger(8);
c.Where(p -> (p mod 10 = 0) and p.InRange(150, 250)).Println
.Sum.Println;
// 4
var d := ReadArrInteger(5);
d.Where(p -> p mod 10 = 4).Min.Println
end.