program ll1;
var A: array[1..20] of integer;
i, k: integer;
begin
Randomize;
for i:=1 to 20 do
A[i]:=random(40)-20;
write(A[i], ' ');
end;
writeln();
if A[i] mod 2 = 0 then
k:=k+1;
writeln(A[i]);
writeln(k);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
program ll1;
var A: array[1..20] of integer;
i, k: integer;
begin
Randomize;
for i:=1 to 20 do
begin
A[i]:=random(40)-20;
write(A[i], ' ');
end;
writeln();
for i:=1 to 20 do
if A[i] mod 2 = 0 then
begin
k:=k+1;
writeln(A[i]);
end;
writeln(k);
end.