Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {Волкович Максим (volkovcih.maksim.s@gmail.com), 112гр., v1.0,
- описать рекурсивную процедуру, которая заменяет первое вхождение элемента Е1 на Е2}
- type list:chain;
- chain = record elem:t; next:list end;
- procedure change(e1,e2:t; var l:list);
- begin
- if l<>nil then
- if l^.elem=e1 then l^.elem:=e2
- else change(e1,e2; l^.next);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement