//прога на Pascal`e
var
a : array[1..10] of shortint;
i, count, sum : byte;
begin
randomize;
write ('Сформированный массив: ');
for i:=1 to 10 do
begin
a[i]:=random (20);
write (a[i], '; ');
inc (sum, a[i]);
end;
writeln ();
write ('Кол-во элементов массива, значение которых превышает СА: ');
for i:=1 to 10 do
if a[i]>(sum/10) then inc (count, 1);
write (count);
end.
1)
DIM A(9)
RANDOMIZE TIMER
FOR i = 1 TO 9 STEP 3
A(i) = i
A(i + 1) = INT(41 * RND) + 10
A(i + 2) = INT(A(i + 1) / A(i))
NEXT i
FOR i = 1 TO 9
PRINT "A("; i; ")="; A(i)
NEXT i
END
2)
DIM A(10)
RANDOMIZE TIMER
PRINT "Иcxoдный мaccив: "
FOR i = 1 TO 10
A(i) = INT(RND * 10) + 1
PRINT A(i),
NEXT i
PRINT
S = 0
FOR i = 1 TO 10
IF A(i) MOD 2 = 0 THEN S = S + A(i)
NEXT i
PRINT "Cyммa чeтныx элeмeнтoв = "; S
<span>END</span>