correçao minima de prints e nome de metodos/procedimentos

This commit is contained in:
2026-06-30 10:49:26 -03:00
parent 1905e88fa5
commit ffb62558bd
+12 -2
View File
@@ -111,11 +111,13 @@ procedure inserirCPF(var cpfs:THash; var cpf:string);
writeln('CPF INVALIDO'); writeln('CPF INVALIDO');
end; end;
procedure escrever(var cpfs:thash); procedure escreverCPF(var cpfs:thash);
var var
i:integer; i:integer;
aux:^ptcpf; aux:^ptcpf;
achados:integer;
begin begin
achados:=0;
for i:= 0 to 99 do for i:= 0 to 99 do
begin begin
writeln('Digito final', i); writeln('Digito final', i);
@@ -123,9 +125,11 @@ procedure escrever(var cpfs:thash);
while (aux <> nil) do while (aux <> nil) do
begin begin
writeln(aux^.cpf); writeln(aux^.cpf);
aux:= aux^.prox aux:= aux^.prox;
achados:=achados+1;
end; end;
end; end;
writeln('Total de cpfs: ',achados) ;
end; end;
procedure buscar(var cpfs:thash;cpf:string); procedure buscar(var cpfs:thash;cpf:string);
@@ -190,6 +194,7 @@ begin
writeln('ADD cpf: 1'); writeln('ADD cpf: 1');
writeln('Validar existencia: 2'); writeln('Validar existencia: 2');
writeln('RM cpf: 3'); writeln('RM cpf: 3');
writeln('Listar cpfs: 4');
writeln('exit: 0'); writeln('exit: 0');
readln(op); readln(op);
@@ -235,6 +240,11 @@ begin
writeln('cpf invalido poxa'); writeln('cpf invalido poxa');
end; end;
4:
begin
escreverCPF(hash);
end;
0 : 0 :
begin begin
cont:= true; cont:= true;