Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
test07
program test07; {pointer example of direct chain growth and key inf choice} type spisok=^elem; elem=record inf:real ; sled:spisok end ; label 1,2; var a, pervy : spisok ; mas: array[1..3] of integer ; M, i:integer ; b:boolean; procedure sostavlenie2(var p1:spisok; N:integer) ; var q,p2:spisok ; begin New(q) ; {data generator} p1:=q;{head safe} p2:=q; for i :=1 to N do begin q^.inf:=mas[i] ; q^.sled:=Nil; p2^.sled:=q; p2:=p2^.sled; New(q); end ; end ; begin M:=3; for i:=1 to M do mas[i]:=i ; sostavlenie2(pervy, M) ; a:=pervy ; b:=true; while (a<> nil) and b do if a^.inf=3 then b:=false {key inf achieved} else begin a:=a^.sled; if a=nil then goto 1 end; writeln(a^.inf:2:1) ; goto 2 ; 1: writeln('no such key info element'); 2:end.
run
|
edit
|
history
|
help
0
basketball_player_training
ANDRESSA LIMA NEPOMUCENO 600624624
[DE/GER] Caesar Chiffre (Verschlüsseln)
nombre_completo
Pascal First
record as a procedure argument
Озвучка
Matrix,colums with all equal elements
1º Questão - VS - 1º Semestre 2017
test