===== PascalABC.NET =====
begin
// 1
var (i, p) := (12, int64(1));
while i < 100 do
p *= i;
i += 12
end;
Println('П =', p);
// 2
var (k, s) := (0, 0);
for var j := 2222 to 4444 do
if (j div 1000) = (j mod 10) then
s += j;
k += 1
Println('Среднее =', s / k)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
===== PascalABC.NET =====
begin
// 1
var (i, p) := (12, int64(1));
while i < 100 do
begin
p *= i;
i += 12
end;
Println('П =', p);
// 2
var (k, s) := (0, 0);
for var j := 2222 to 4444 do
if (j div 1000) = (j mod 10) then
begin
s += j;
k += 1
end;
Println('Среднее =', s / k)
end.