Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {Волкович Максим (volkovcih.maksim.s@gmail.com), 112гр., v1.0,
- описать процедуру, которая удаляет последний элемент списка L}
- type T=...;
- list=^chain;
- chain=record elem:T; next:list end;
- procedure deletelst(var L:list);
- var s,q:list;
- begin
- s:=L;
- while s^.next^.next<>nil do
- s:=s^.next;
- q:=s^.next;
- s^.next:=nil;
- dispose(q);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement