Upload presentasi
Presentasi sedang didownload. Silahkan tunggu
Diterbitkan olehAlfian Jasmine Telah diubah "10 tahun yang lalu
1
Kompetensi : Mahasiswa mampu menggunakan rutin yang ada dalam STL C++ #2. 16 Maret 2012
2
Kompetensi 2, 3 #include int main() { list coll; // list container for character elements // append elements from 'a' to 'z' for (char c='a'; c<='z'; ++c) { coll.push_back(c); } system("PAUSE"); return 0; } Latihan 2-3.1
3
Kompetensi 2, 3 #include int main() { list coll; // list container for character elements // append elements from 'a' to 'z' for (char c='a'; c<='z'; ++c) { coll.push_front(c); } system("PAUSE"); return 0; } Latihan 2-3.2
4
Kompetensi 2,3,4 1.#include 2.#include 3. 4.int main() 5.{ 6. list coll; // list container for integer elements 7. 8. // append elements from 1 to 20 9. for (int c=1; c<=20; ++c) { 10. coll.push_back(c); 11. } 12. system("PAUSE"); 13. return 0; 14.} Latihan 2-4.1
5
Kompetensi 2,3,4 1.#include 2.#include 3. 4.int main() 5.{ 6. list coll; // list container for integer elements 7. 8. // append elements from 1 to 20 9. for (int c=1; c<=20; ++c) { 10. coll.push_back(c); 11. } 12. system("PAUSE"); 13. return 0; 14.} 1 2 3 4 5 6 7 8 9 10 11 ……….. 20 Di Memori List Latihan 2-4.2
6
Kompetensi 2,3,4 1.#include 2.#include 3. 4.int main() 5.{ 6. list coll; // list container for integer elements 7. 8. // append elements from 1 to 20 9. for (int c=1; c<=20; ++c) { 10. coll.____________(c); 11. } 12. system("PAUSE"); 13. return 0; 14.} 20 19 18 17 16 15 14 ….. 5 4 3 2 1 Di Memori List Latihan 2-4.3
7
Kompetensi 2,3,4 1.#include 2.#include 3. 4.int main() 5.{ 6. list coll; // list container for character elements 7. 8. // append elements from 1 to 20 9. for (int c=1; c<=20; ++c) { 10. coll.push_front(c); 11. } 12. 13. while (! coll.empty()) { 14. cout << coll.front() << ' '; 15. coll.pop_front(); 16. } 17. cout << endl; 18. 19. system("PAUSE"); 20. return 0; 21.} 20 19 18 17 16 15 14 ….. 5 4 3 2 1 Di Layar Latihan 2-4.4
8
Kompetensi 2,3,4 #include int main() { list coll; // list container for character elements // append elements from 1 to 20 for (int c=1; c<=20; ++c) { coll.push_front(c); } while (! coll.empty()) { cout << coll.back() << ' '; coll.pop_back(); } cout << endl; system("PAUSE"); return 0; } 20 19 18 17 16 15 14 ….. 5 4 3 2 1 Dilayar ? Salah atau Benar Latihan 2-4.5
9
Tugas Membuat makalah yang mengupas isi header list.h. Makalah dibuat per 5 orang Dikumpulkan tgl 22 Maret 2012 melalui e-mail aetthea@yahoo.com, yogi.ramadhani@gmail.com aetthea@yahoo.com
Presentasi serupa
© 2024 SlidePlayer.info Inc.
All rights reserved.