program EvenNumbers;
varn, count, i: integer;
beginwriteln('Enter a number: ');readln(n);
count := 0;
for i := 2 to n dobeginif i mod 2 = 0 thenbeginwriteln(i);count := count + 1;end;end;
writeln('Total count of even numbers: ', count);
end.
program EvenNumbers;
var
n, count, i: integer;
begin
writeln('Enter a number: ');
readln(n);
count := 0;
for i := 2 to n do
begin
if i mod 2 = 0 then
begin
writeln(i);
count := count + 1;
end;
end;
writeln('Total count of even numbers: ', count);
end.