Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
test06
//fpc 3.0.4 program test06;{ direct grow of the chain} const M=9; {number of element of the chain} type spisok=^element; mas=array[1..M] of integer; element=record info: integer; sled:spisok; end; var pervy, a: spisok; x,d:mas; i:integer; begin for i := 1 to M do x[i]:=i; New(pervy); new(a); a^.sled:=nil; pervy:=a; for i:= 1 to M do begin a^.info:=x[i]; new(a^.sled); a:=a^.sled; end; a^.sled:=nil; dispose(a); while pervy^.sled<>nil do begin d[i]:=pervy^.info; write(d[i]:5,' '); pervy:=pervy^.sled; end; {for i:=1 to M do write(d[i]:5, ' ');} writeln; dispose(pervy); end.
run
|
edit
|
history
|
help
0
zadacha9
числа с несовпадающими цифрами
Kacper
Calculatrice (case of)
12345
BubbleSor (slimmer)
2
Huong11a2@
test10
444555666