program CountPairs;
vararr: array[1..20] of integer;i, pairs: integer;
beginpairs := 0;
for i := 1 to 20 dobeginwrite('Enter element ', i, ': ');readln(arr[i]);end;
for i := 1 to 19 dobeginif (arr[i] mod 2 <> 0) or (arr[i+1] mod 2 <> 0) thenpairs := pairs + 1;end;
writeln('Number of pairs with at least one odd element: ', pairs);end.
program CountPairs;
var
arr: array[1..20] of integer;
i, pairs: integer;
begin
pairs := 0;
for i := 1 to 20 do
begin
write('Enter element ', i, ': ');
readln(arr[i]);
end;
for i := 1 to 19 do
begin
if (arr[i] mod 2 <> 0) or (arr[i+1] mod 2 <> 0) then
pairs := pairs + 1;
end;
writeln('Number of pairs with at least one odd element: ', pairs);
end.