Pascal

contactwahyu on October 15th, 2014

Uses crt; Type simpul = ^data; data = record bilangan : integer; next : simpul; end; var awal,akhir,baru,bantu : simpul; procedure sisip_depan; begin new(baru); write (‘Masukkan Bilangan : ‘); readln (baru^.bilangan); if awal=nil then begin baru^.next:=nil; awal:=baru; akhir:=baru; end else begin baru^.next:=awal; awal:=baru; end; end; procedure tampil; begin bantu:=awal; while (bantu<>nil) do begin writeln(bantu^.bilangan); bantu:=bantu^.next; […]

Continue reading about Contoh Linked List Sederhana dengan Pascal