Pascal
const
n=20;
var
a : array [0..n] of integer;
i : integer;
begin
randomize;
writeln('Массив A');
for i:=0 to n-1 do begin
a[i] := random(100);
write(a[i], ' ');
end;
writeln();
for i:=0 to n-1 do
if a[i] mod 2 = 0 then begin
writeln('a[', i,']=',a[i]);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Pascal
const
n=20;
var
a : array [0..n] of integer;
i : integer;
begin
randomize;
writeln('Массив A');
for i:=0 to n-1 do begin
a[i] := random(100);
write(a[i], ' ');
end;
writeln();
for i:=0 to n-1 do
if a[i] mod 2 = 0 then begin
writeln('a[', i,']=',a[i]);
end;
end.