var
a: array [1..30] of Word;
i, c, sum: Word;
begin
Randomize;
for i := 1 to 30 do
a[i] := Random (76);
Write (a[i], ' ');
WriteLn;
if (a[i] >= 10) and (a[i] <= 35) then begin
Inc (c);
sum := sum + a[i];
Write (a[i], ' ')
end;
WriteLn ('Кол-во чисел из диапазона [10; 35]: ', c);
Write ('Сумма чисел из диапазона [10; 35]: ', sum);
end.
var
a: array [1..30] of Word;
i, c, sum: Word;
begin
Randomize;
for i := 1 to 30 do
a[i] := Random (76);
for i := 1 to 30 do
Write (a[i], ' ');
WriteLn;
for i := 1 to 30 do
if (a[i] >= 10) and (a[i] <= 35) then begin
Inc (c);
sum := sum + a[i];
Write (a[i], ' ')
end;
WriteLn;
WriteLn ('Кол-во чисел из диапазона [10; 35]: ', c);
Write ('Сумма чисел из диапазона [10; 35]: ', sum);
end.