консольный режим.
Код:
program Project2;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
a,i:integer;
het,nehet:integer;
bol:boolean;
begin
i:=0;
het:=0;
nehet:=0;
Writeln('Введите набор ненулевых целых чисел; признак его завершения - число 0.');
Read(a);
bol:=true;
While (a<>0) do
begin
if (a mod 2)=0 then
begin
inc(het);
if bol then inc(i);
end;
if (a mod 2)=1 then
begin
inc(nehet);
bol:=false;
end;
Read(a);
end;
Writeln('Otvet');
if nehet>het then Writeln(nehet);
if het>nehet then Writeln(het);
if nehet=het then Writeln(nehet,'=',het);
if nehet=0 then Writeln(0)
else Writeln(i);
readln;
readln;
end.