===== PascalABC.NET =====
begin
// 1
Println('- 1 -');
var a := ArrGen(28, i -> 10 * Random(6));
a.Println;
Print('Без осадков:');
for var i := 0 to a.High do
if a[i] = 0 then
(i+1).Print;
Writeln;
// 2
Println('- 2 -');
var b := ArrRandom(20, -30, 80);
b.Println;
b.Transform((v, i) -> i.IsOdd ? Abs(v) : v);
// 3
Println('- 3 -');
var n := ReadInteger('n =');
var c := ArrRandom(n, -50, 50);
c.Println;
Println('Min =', c.Min)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
===== PascalABC.NET =====
begin
// 1
Println('- 1 -');
var a := ArrGen(28, i -> 10 * Random(6));
a.Println;
Print('Без осадков:');
for var i := 0 to a.High do
if a[i] = 0 then
(i+1).Print;
Writeln;
// 2
Println('- 2 -');
var b := ArrRandom(20, -30, 80);
b.Println;
b.Transform((v, i) -> i.IsOdd ? Abs(v) : v);
b.Println;
// 3
Println('- 3 -');
var n := ReadInteger('n =');
var c := ArrRandom(n, -50, 50);
c.Println;
Println('Min =', c.Min)
end.