Const N = 33; Var A:array[1..N] of real; i,k:integer; Begin Randomize; k:=0; For i:= 1 to N do Begin if random(2) = 1 then A[i]:=random*N else A[i]:=0; Write(A[i]:0:3,' '); if A[i] = 0 then k:=k+1 End; WriteLn; WriteLn('Количество нулей в массиве: ',k); ReadLn End.
N = 33;
Var
A:array[1..N] of real;
i,k:integer;
Begin
Randomize;
k:=0;
For i:= 1 to N do
Begin
if random(2) = 1 then A[i]:=random*N
else A[i]:=0;
Write(A[i]:0:3,' ');
if A[i] = 0 then k:=k+1
End;
WriteLn;
WriteLn('Количество нулей в массиве: ',k);
ReadLn
End.