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 do
- begin
- if l^.elem=e1 then l^.elem:=e2;
- change(e1,e2; l^.next);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement