2. impares:=impares+1;
while i>=0 do
begin
new(y);
y^.dato:=i;
y^.siguiente:=x;
x:=y;
write('Ingrese un numero: ');
readln(i);
if i>=0 then
begin
Spares:=Spares+1;
if i mod 2=0 then
pares:=pares+1;
if i mod 2<>0 then
impares:=impares+1;
end;
end;
clrscr;
while y^.siguiente<>nil do
begin
writeln(y^.dato);
x:=y^.siguiente;
dispose(y);
y:=x;
end;
writeln('Los numeros ingresados fueron: ',Spares);
writeln('Los numeros pares ingresados fueron: ',pares);
writeln('Los numeros impares ingresados fueron: ',impares);
readkey;
dispose(x);
end.
__________________________________________________________
__________________________________________________________