Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program t_16_11(input,output);
- {A}
- type chain = ^elem;
- elem = record lnkreal:real; lnk:chain end;
- var p:chain;
- begin
- new(p);
- p^.lnkreal:=0.5;
- new(p^.lnk);
- p^.lnk^.lnkreal:=p^.lnkreal;
- p^.lnk^.lnk:=nil;
- end.
- {Б}
- type chain = ^elem;
- elem = record lnkchar:char; lnk:chain end;
- var p:chain;
- begin
- new(p);
- p^.lnkchar:='a';
- new(p^.lnk);
- p^.lnk^.lnkchar:='b';
- p^.lnk^.lnk:=nil;
- end.
- {B}
- type chain = ^elem;
- elem = record lnkleft: chain; lnkbool:boolean; lnkright:chain end;
- var p:chain;
- begin
- new(p);
- p^.lnkleft:=nil;
- p^.lnkbool:=true;
- new(p^.lnkright);
- p^.lnkright^.lnkleft:=p^.lnkright;
- p^.lnkright^.lnkbool:=false;
- p^.lnkright^.lnkright:=p^.lnkleft;
- end.
- {Г}
- type chain = ^elem;
- elem = record lnkleft: chain; lnkint:integer; lnkright:chain end;
- var p:chain;
- begin
- new(p);
- new(p^.lnkleft);
- p^.lnkint:=1;
- new(p^.lnkright);
- p^.lnkleft^.lnkleft:=nil;
- p^.lnkleft^.lnkint:=2;
- p^.lnkleft^.lnkright:=nil;
- p^.lnkright^.lnkleft:=nil;
- p^.lnkright^.lnkint:=3;
- p^.lnkright^.lnkright:=nil;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement