tentando enteder mais não vai

This commit is contained in:
Gustavo Erlindo Dellajustina Demarchi
2026-04-29 11:28:35 -03:00
committed by GitHub
parent 56be04636d
commit c51d75f5a1
+14 -2
View File
@@ -27,7 +27,8 @@ program pzim;
procedure adicionar_lista(var lista : Tlista ; chave : string);
var
aux , aux2 : Tlista;
aux , aux_Ant , aux_Prox : Tlista;
temp_s : string;
begin
new(aux);
if
@@ -36,10 +37,21 @@ program pzim;
begin
while aux^.prox <> nil do
aux := aux^.prox;
temp_s := aux^.key;
aux^.key := chave ;//
new (aux_Ant);
new (aux_Prox);
if maior(temp_s , chave)then
begin
if aux^.ant <> nil then
aux_Ant := aux^.ant ;
if aux^.prox <> nil then
aux_Prox := aux^.prox;
aux^.key := chave ;//
end;
end;
end;