Upload
dani-ibrahim
View
223
Download
0
Embed Size (px)
Citation preview
7/24/2019 17-Maret-2012-3.pptx
1/9
Kompetensi : LIST
#3.
17 Maret 2012
7/24/2019 17-Maret-2012-3.pptx
2/9
Kompetensi 5
7/24/2019 17-Maret-2012-3.pptx
3/9
Kompetensi 5
7/24/2019 17-Maret-2012-3.pptx
4/9
Kompetensi 51. // Latihan Kompetensi 5:: LIST
2. // File : Lat5_Liste1.!pp3. #in!l"e $iostream.h%
&. #in!l"e $list.h%
5.
'. int main()
7. *
+. list$int% !oll, // list !ontainer -or inteer elements
. list$int%::iterator pos, //Men"naan iterator seaai pen"n" pointer element List$int%
10.
11. // appen elements -rom 1 to 20
12. -or (int !1, !$20, !) *
13. !oll.p"sh_-ront(!),
1&. 4
15. // rint in-o noe 6an it"n" oleh pos
1'. pos !oll.ein(),
17. !o"t $$ (pos) $$ 8 8,
1+.
1.
20. s6stem(9;S
7/24/2019 17-Maret-2012-3.pptx
5/9
Kompetensi 5 : Iterasi
ointer pos
pospos1, ata" pos,
7/24/2019 17-Maret-2012-3.pptx
6/9
Kompetensi 51. // Latihan Kompetensi 5:: LIST
2. // File : Lat5_Liste1.!pp
3. #in!l"e $iostream.h%&. #in!l"e $list.h%
5. int main()
'. *
7. list$int% !oll, // list !ontainer -or inteer elements
+. list$int%::iterator pos, //Men"naan iterator seaai pen"n" pointerelement List$int%
. // appen elements -rom 1 to 20
10. // aris 11 s 13 "nt" mement" List an isin6a ..............
11. // rint in-o paa sel"r"h noe ari str"t"r List !oll
12. -or (pos!oll.ein(), pos=!oll.en(), pos)
13. *1&. !o"t $$ (pos) $$ 8 8,
15. !o"t $$ enl ,
1'. 4
17. s6stem(9;S
7/24/2019 17-Maret-2012-3.pptx
7/9
Latihan >i Kelas
1. Mahasis?a erelompo@ setiapelompo 5 oran
2. MoiAasilah proramBproram(Lat5_Liste1.!pp@ Lat5_Liste2.!pp)i atas menai List$!har%.
3. C"atlah DariasiBDariasi e!il@misalan metoe p"sh_a!()ianti menai p"sh_-ront()
7/24/2019 17-Maret-2012-3.pptx
8/9
T"as Kelompo
MoiAasilah proram Lat5_Liste2.!ppan s"s"nlah metoe Sear!hin@ TraDersal@Sortin s"at" nilai alam str"t"r List 6an
ian"n.
E"naan metoe 6an s"ah aa alamlist.h STL
>i"mp"lan tl 22 Maret 2012 melal"i eBmail [email protected].!om
mailto:[email protected]:[email protected]:[email protected]:[email protected]7/24/2019 17-Maret-2012-3.pptx
9/9
Format eniriman