<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5343624780824062495</id><updated>2024-11-01T17:43:38.627+07:00</updated><category term="Algoritma dan Pemrograman"/><category term="Belajar Struktur Data"/><category term="Laporan Praktikum Algoritma dan Pemrograman"/><category term="Laporan Praktikum Struktur Data"/><category term="Java"/><category term="Jeliot 3"/><category term="Mobile Technology"/><category term="Laporan Diskusi Kelompok 6A"/><title type='text'>Learn Technology</title><subtitle type='html'>Mobile Technology | Programming | Data Structure |  C++ | Java |</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-4065179718887539087</id><published>2011-10-16T13:48:00.000+07:00</published><updated>2011-10-16T13:55:17.249+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mobile Technology"/><title type='text'>Windows 8 (Next OS from Microsoft)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPf3YAHT5yop6VEBYfecJoX2OJENLqrU3feVUnftLHSyUXBwyw_Wi9eGSSohNmbNJ376nqEOveY6vYIU_JWsA3Yl0-6oKl_SDSSygZFBOa1fFAOOV4p6J8WmcrivqUSxuAharhxewh838/s1600/Windows8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;125&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPf3YAHT5yop6VEBYfecJoX2OJENLqrU3feVUnftLHSyUXBwyw_Wi9eGSSohNmbNJ376nqEOveY6vYIU_JWsA3Yl0-6oKl_SDSSygZFBOa1fFAOOV4p6J8WmcrivqUSxuAharhxewh838/s200/Windows8.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Windows 8 yang ditampilkan menggunakan interface yang mirip dengan 
interface Metro milik Windows Phone 7. Dari demo yang ditampilkan, 
terlihat jelas bahwa Windows 8 ini didesain untuk penggunaan 
touchscreen. Lebih jelasnya bisa dilihat di video ini.&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Aplikasi di Windows 8 ini terdiri dari dua jenis, yaitu yang tradisional
 (seperti di kebanyakan komputer  desktop) dan aplikasi mobile yang 
dibuat dengan menggunakan bahasa HTML5 dan JavaScript. Dari awal, 
Windows 8 ini sudah dirancang untuk penggunaan touchscreen. Keyboard dan
 mouse konvensional masih dapat digunakan, namun terdapat juga virtual 
keyboard yang banyak digunakan pada kebanyakan PC tablet. Multitasking 
dilakukan semudah menggeser aplikasi yang sedang berjalan ke tengah 
layar, dan dapat juga diletakkan berjejeran dengan aplikasi lain. Bahkan
 dapat juga menjejerkan antara aplikasi desktop tradisional dengan 
aplikasi web secara bersamaan (misalnya 
Twitter dengan aplikasi spreadsheet macam Excel). &lt;br /&gt;

Microsoft menyatakan bahwa Windows 8 ini akan menggunakan prosesor ARM 
yang biasa digunakan di gadget mobile (Windows sebelumnya menggunakan 
prosesor berbasis x86 milik Intel dan AMD). Microsoft juga dengan tegas 
menyatakan bahwa nama “Windows 8” hanyalah sebuah codename dan bukan 
nama sebenarnya. Belum diketahui mengapa Microsoft begitu gencar 
melarang penyebutan nama “Windows 8” sebagai nama rilis produk terbaru 
mereka.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Milestone Windows 8&lt;/b&gt; &lt;br /&gt;
Milestone 1 (build 7850, tanggal 22 September 2010) bocor ke 
BetaArchive, sebuah komunitas beta online, dan kemudian bocor juga ke 
jaringan P2P/torrent pada tanggal 12 April 2011. Milestone 1 mencakup  
interface Ribbon untuk Windows Explorer, PDF reader yang disebut Modern 
Reader, task manager yang diperbarui yang disebut Modern Task Manager, 
dan dukungan untuk mounting file ISO.&lt;br /&gt;

Milestone 3 (build 7971), dirilis pada 29 Maret 2011, tetapi dijaga di 
bawah pengamanan ketat. Namun, beberapa screenshot sempat bocor. Theme 
dari Windows 7 Basic telah diganti dengan tema baru, di mana kotak yang 
mengelilingi tombol close, maximize, dan minimize telah dihapus, 
sehingga hanya simbol saja yang terlihat. &lt;br /&gt;

Milestone 3 menyajikan layar Welcome yang baru, sebuah paket aplikasi 
model baru yang disebut AppX yang didasarkan pada Silverlight, Windows 
Store untuk review dan membeli aplikasi online, dan pengaturan secara 
otomatis untuk menyesuaikan warna agar sesuai dengan wallpaper. Windows 8
 juga mencakup versi Internet Explorer yang sudah disederhanakan, mirip 
dengan versi mobile-nya, tetapi menggunakan desktop Trident rendering 
engine.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Fitur Windows 8&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;alt2&quot; style=&quot;border: 1px inset; margin: 0px; padding: 6px;&quot;&gt;
 &lt;div&gt;
 &lt;ul&gt;
&lt;li&gt;Start
 menu kini berubah menjadi Start Screen, yang menampilkan 
aplikasi-aplikasi “live”. User dapat juga berpindah menggunakan tampilan
 desktop tradisional. Contoh aplikasi yang terdapat di Start Screen 
meliputi aplikasi cuaca, Windows Store, Investments, News Feed, Personal
 Page, dan akun Windows Live. Sayangnya, untuk layar dengan resolusi 
1024x600 (seperti kebanyakan layar netbook) hanya dapat menggunakan 
desktop tradisional.&lt;/li&gt;
&lt;li&gt;Penggunaan prosesor dan memori dengan lebih efisien, sehingga Windows 8 dapat berjalan dengan mulus.&lt;/li&gt;
&lt;li&gt;Interface Ribbon kini digunakan hampir di semua elemen Windows, termasuk Windows Explorer.&lt;/li&gt;
&lt;li&gt;Kemungkinan besar menggunakan file system baru dengan codename “Protogon”.&lt;/li&gt;
&lt;li&gt;Native support untuk PDF dan mounting file ISO.&lt;/li&gt;
&lt;li&gt;Perubahan pada Windows Task Manager.&lt;/li&gt;
&lt;li&gt;Hybrid Boot yang merupakan peningkatan dari fungsi hibernate yang memungkinkan shutdown dan startup lebih cepat.&lt;/li&gt;
&lt;li&gt;Portable Workspace, Instalasi Windows 8 dari perangkat USB.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;System Requirement&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;alt2&quot; style=&quot;border: 1px inset; margin: 0px; padding: 6px;&quot;&gt;
 &lt;div&gt;
 &lt;br /&gt;
Microsoft telah menyatakan bahwa system requirement untuk Windows 8 sama dengan Windows 7.&lt;ul&gt;
&lt;li&gt;Prosesor: 1 GHz x86 (32-bit) dan 1GHz x86-64 (64-bit)&lt;/li&gt;
&lt;li&gt;Memori: 1 GB (32-bit) dan 2 GB (64-bit)&lt;/li&gt;
&lt;li&gt;VGA:  mendukung DirectX 9 dengan WDDM 1.0 (untuk Aero)&lt;/li&gt;
&lt;li&gt;HDD: 16 GB (32-bit) dan 20 GB (64-bit)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/4065179718887539087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/10/windows-8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/4065179718887539087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/4065179718887539087'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/10/windows-8.html' title='Windows 8 (Next OS from Microsoft)'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPf3YAHT5yop6VEBYfecJoX2OJENLqrU3feVUnftLHSyUXBwyw_Wi9eGSSohNmbNJ376nqEOveY6vYIU_JWsA3Yl0-6oKl_SDSSygZFBOa1fFAOOV4p6J8WmcrivqUSxuAharhxewh838/s72-c/Windows8.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-5997429296031085431</id><published>2011-10-12T13:31:00.001+07:00</published><updated>2011-10-12T13:36:24.284+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mobile Technology"/><title type='text'>Perkembangan Teknologi Touchscreen</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8Lv73eLViUn8AbprwSuAByAJL6XDHgbrvzXV6T-grCuqytSRpo-zpyT9e8LkbdcY07uiScOVcTH3AZx4qT0A1CA82lT65eFEejntsnl1cPr0KN_RMY0MCW1hKW4NwbPTgtGa5Rac4mRI/s1600/fruit.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;141&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8Lv73eLViUn8AbprwSuAByAJL6XDHgbrvzXV6T-grCuqytSRpo-zpyT9e8LkbdcY07uiScOVcTH3AZx4qT0A1CA82lT65eFEejntsnl1cPr0KN_RMY0MCW1hKW4NwbPTgtGa5Rac4mRI/s200/fruit.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Touchscreen merupakan sebuah 
perangkat komputer yang biasanya digunakan untuk menampilkan informasi 
grafikal dan visual yang merupakan output dari sebuah perangkat 
komputer. Namun, yang membedakannya dengan monitor atau layar televisi 
biasa adalah apa yang ditampilkan di dalamnya dapat secara langsung 
berinteraksi fisik dengan penggunanya. &lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Maksudnya, Anda dapat langsung 
menyentuh layar penampil tersebut dengan tangan atau alat bantu untuk 
mengakses apa yang ditampilkan di dalamnya.&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Cara Kerja Touchscreen&lt;/span&gt;&lt;br /&gt;
Sebuah 
layar touchscreen yang paling sederhana terdiri dari tiga buah komponen 
utama dalam bekerja. Komponen tersebut adalah sebagai berikut:&lt;br /&gt;
1. Touch Sensor&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Touch sensor merupakan sebuah lapisan penerima input dari luar monitor. &lt;br /&gt;
Input dari touchscreen adalah sebuah sentuhan, maka dari itu sensornya juga merupakan sensor sentuh.&lt;br /&gt;
2. Controller&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Controller merupakan sebuah perangkat yang digunakan untuk menghubungkan
 antara sensor dengan perangkat komputer yang akan memproses sentuhan 
tersebut.&lt;br /&gt;
3. Software driver &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Software driver merupakan sebuah software pengatur yang diinstal pada 
perangkat komputer atau PC Anda yang tugasnya adalah untuk mengatur agar
 perangkat touchscreen dan komputer dapat bekerja sama untuk digunakan 
dalam berbagai macam keperluan.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Teknologi Touchscreen&lt;/b&gt; &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;1. &lt;/b&gt;&lt;b&gt;Resistive Touchscreen&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2B_K9KNj6qam4dsWBl5N-cwNONgwQ7DPYKHFOeac19LWQ5JqhE6-KVu0xzQepL-wi9D7A3Zk4OyrNNaJPvhoddms4exWQcP6zQV9AkgLEVxVH2QACgLf9avGTdazXooHZiWE7cgRpKqs/s1600/insert_button_bg.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;138&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2B_K9KNj6qam4dsWBl5N-cwNONgwQ7DPYKHFOeac19LWQ5JqhE6-KVu0xzQepL-wi9D7A3Zk4OyrNNaJPvhoddms4exWQcP6zQV9AkgLEVxVH2QACgLf9avGTdazXooHZiWE7cgRpKqs/s200/insert_button_bg.gif&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Touchscreen yang termasuk dalam jenis ini adalah touchscreen yang 
layarnya dilapisi oleh sebuah lapisan tipis berwarna metalik yang 
bersifat konduktif dan resistif terhadap sinyal-sinyal listrik. Maksud 
dari lapisan yang bersifat konduktif adalah lapisan yang bersifat mudah 
menghantarkan sinyal listrik, sedangkan lapisan resistif adalah lapisan 
yang menahan arus listrik. Kedua lapisan ini dipisahkan oleh sebuah 
bintik-bintik transparan pemisah, jadi lapisan ini pasti terpisah satu 
sama lain dalam keadaan normal. Pada lapisan konduktif tersebut juga 
mengalir arus listrik yang bertugas sebagai arus referensi.
&lt;br /&gt;
Ketika terjadi sentuhan kedua lapisan ini akan dipaksa untuk saling 
berkontak langsung secara fi sik. Karena adanya kontak antara lapisan 
konduktif dan resistif maka akan terjadi gangguan pada arus listrik 
referensi tersebut. Efek dari gangguan ini pada lapisan konduktif adalah
 akan terjadi perubahan arus-arus listriknya sebagai reaksi dari sebuah 
kejadian sentuhan. Perubahan nilai arus referensi ini kemudian 
dilaporkan ke controllernya untuk di proses lebih lanjut lagi.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Informasi sentuhan tadi diolah secara matematis oleh controller sehingga
 menghasilkan sebuah koordinat dan posisi yang akurat dari sentuhan 
tersebut. Kemudian informasi ini diintegrasikan dengan program lain 
sehingga menjadi aplikasi yang mudah digunakan.&lt;br /&gt;
Touchscreen monitor yang dirancang dengan menggunakan media jenis ini 
secara umum cukup nyaman digunakan, namun ada juga kekurangan dari 
teknologi ini. Layar yang dihasilkan oleh teknologi ini hanya memiliki 
tingkat kejernihan gambar sebesar 75% saja, sehingga monitor akan tampak
 kurang jernih.&lt;br /&gt;
Kelemahan yang lainnya monitor dengan teknologi touchscreen ini sangat 
rentan dan lemah terhadap sentuhan benda-benda yang agak tajam, sehingga
 penggunanya harus diekstra hati-hati. Teknologi ini tidak akan 
terpengaruh oleh elemen-elemen lain di luar seperti misalnya debu atau 
air, namun touchscreen ini akan merespon semua sentuhan yang 
mengenainya, baik itu menggunakan jari tangan langsung maupun 
menggunakan benda lain seperti stylus. Sangat cocok digunakan untuk 
keperluan di dalam dunia industri seperti di pabrik, laboratorium, dan 
banyak lagi. &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;2. &lt;/b&gt;&lt;b&gt;Surface Wave Touchscreen&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-oKgeDhHmfq-0Yeq6pyu0xuFycQxt-5nt3gQsxxDy3bkiBzDDcyOsb3MKyOzRe67I_gSQoWgx7uJfvYgD_RelwcHALYbQvqI8YnHLtHjTOrzunKGVJRMpWhLrRaQ_m54_apulZJK3JZk/s1600/TScreen-14.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;87&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-oKgeDhHmfq-0Yeq6pyu0xuFycQxt-5nt3gQsxxDy3bkiBzDDcyOsb3MKyOzRe67I_gSQoWgx7uJfvYgD_RelwcHALYbQvqI8YnHLtHjTOrzunKGVJRMpWhLrRaQ_m54_apulZJK3JZk/s200/TScreen-14.gif&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
Teknologi touchscreen yang satu ini memanfaatkan gelombang ultrasonik 
untuk mendeteksi kejadian di permukaan layarnya. Di dalam monitor 
touchscreen ini terdapat dua tranduser, pengirim dan penerima sinyal 
ultrasonik. Selain itu dilengkapi juga dengan sebuah reflektor yang 
berfungsi sebagai pencegah agar gelombang ultrasonic tetap berada pada 
area layar monitor. Kedua tranduser ini dipasang dalam keempat sisi, dua
 vertikal dan dua horizontal. Ketika panel touchscreen-nya tersentuh, 
ada bagian dari gelombang tersebut yang diserap oleh sentuhan tersebut, 
misalnya terhalang oleh tangan, stylus, tuts, dan banyak lagi. Sentuhan 
tadi telah membuat perubahan dalam bentuk gelombang yang dipancarkan.&lt;br /&gt;
Perubahan gelombang ultrasonik yang terjadi kemudian diterima oleh 
receiver dan diterjemahkan ke dalam bentuk pulsa-pulsa listrik. 
Selanjutnya informasi sentuhan tadi berubah menjadi sebentuk data yang 
akan di teruskan ke controller untuk diproses lebih lanjut.&lt;br /&gt;
Data yang dihasilkan dari sentuhan ini tentunya adalah data mengenai 
posisi tangan Anda yang menyentuh sinyal ultrasonik tersebut. Jika ini 
dilakukan secara kontinyu dan terdapat banyak sekali sensor gelombang 
ultrasonic pada media yang disentuhnya, maka jadilah sebuah perangkat 
touchscreen yang dapat Anda gunakan.&lt;br /&gt;
Touchscreen jenis ini diklaim sebagai jenis touchscreen yang paling 
canggih dan memiliki banyak keunggulan daripada kedua jenis touchscreen 
lainnya. Karena tidak menggunakan bahan pelapis metalik melainkan sebuah
 lapisan kaca, maka tampilan dari layar touchscreen jenis ini mampu 
meneruskan cahaya hingga 90 persen, sehingga lebih jernih dan terang 
dibandingkan dengan Resistive touchscreen. Tanpa adanya lapisan sensor 
juga membuat touchscreen jenis ini menjadi lebih kuat dan tahan lama 
karena tidak akan ada lapisan yang dapat rusak atau haus ketika di 
sentuh, tidak ada lapisan yang akan rusak ketika terkena air, minyak, 
debu, dan banyak lagi.&lt;br /&gt;
Namun touchscreen ini juga bukannya tanpa kelemahan. Meskipun secara 
fisik kebal terhadap gangguan elemen-elemen luar, kinerja dari 
touchscreen ini dapat diganggu oleh elemen-elemen seperti debu, air, dan
 benda-benda padat lainnya. Sedikit saja terdapat debu atau benda lain 
yang menempel di atasnya maka touchsreen dapat mendeteksinya sebagai 
suatu sentuhan. Sensor-sensor ultrasonicnya akan langsung bekerja dengan
 baik. Maka itu touchscreen jenis ini harus dijaga dengan ekstra 
hati-hati. Touchscreen jenis ini sangat cocok digunakan pada ruangan 
training komputer, keperluan dalam ruangan untuk menampilkan informasi 
dengan sangat jernih dan tajam, presentasi dalam ruangan, dan banyak 
lagi.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;fullpost&quot;&gt;&lt;b&gt;3. &lt;/b&gt;&lt;/span&gt;&lt;b&gt;Capasitive Touchscreen&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHJcWz0jTFP948PkbHyg0UNtJSzfP19FedWZQyu0tMCIUhVjjsxBaG_-Ak8d3OhS3XOWkg8vuTx-KO1_37MJPvAhDFZfCkDMHVtm0ncu8u8-Rs29H9zEJ5xZeScIqgSFyJbW0xFzDpErQ/s1600/TScreen-18.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHJcWz0jTFP948PkbHyg0UNtJSzfP19FedWZQyu0tMCIUhVjjsxBaG_-Ak8d3OhS3XOWkg8vuTx-KO1_37MJPvAhDFZfCkDMHVtm0ncu8u8-Rs29H9zEJ5xZeScIqgSFyJbW0xFzDpErQ/s200/TScreen-18.gif&quot; width=&quot;141&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Touchscreen jenis ini memiliki cara kerja yang cukup rumit, namun sangat
 andal dalam ketahanan dan kejernihannya. Capasitive touchscreen 
memiliki sebuah lapisan pembungkus yang merupakan kunci dari cara 
kerjanya, yaitu pembungkus yang bersifat capasitive pada seluruh 
permukaannya. Panel touchscreen ini dilengkapi dengan sebuah lapisan 
pembungkus berbahan indium tinoxide yang dapat meneruskan arus listrik 
secara kontiniu untuk kemudian ditujukan ke sensornya.&lt;br /&gt;
Lapisan ini dapat memanfaatkan sifat capacitive dari tangan atau tubuh 
manusia, maka dari itu lapisan ini dipekerjakan sebagai sensor sentuhan 
dalam touchscreen jenis ini. Ketika lapisan berada dalam status normal 
(tanpa ada sentuhan tangan), sensor akan mengingat sebuah nilai arus 
listrik yang dijadikan referensi. Ketika jari tangan Anda menyentuh 
permukaan lapisan ini, maka nilai referensi tersebut berubah karena ada 
arus-arus listrik yang berubah yang masuk ke sensor. Informasi dari 
kejadian ini yang berupa arus listrik akan diterima oleh sensor yang 
akan diteruskan ke sebuah controller. Controller ini berfungsi untuk 
meneruskan informasi tersebut ke mesin pengalkulasi posisi dari gangguan
 atau sentuhan tersebut. Proses kalkulasi posisi akan dimulai di sini.&lt;br /&gt;
Kalkulasi ini menggunakan posisi dari ke empat titik sudur pada panel 
touchscreen sebagai referensinya. Ketika hasil perhitungannya didapat, 
maka koordinat dan posisi dari sentuhan tadi dapat di ketahui dengan 
baik. Akhirnya informasi dari posisi tersebut akan diintegrasikan dengan
 program lain untuk menjalankan sebuah aplikasi.&lt;br /&gt;
Capasitive touchscreen sangat berbeda dengan kedua jenis touchscreen 
sebelumnya. Touchscreen jenis ini baru dapat bekerja jika 
sentuhan-sentuhan yang ditujukan kepadanya berasal dari benda yang 
bersifat konduktif seperti misalnya jari-jari Anda. Tidak seperti 
Resistive atau Surface wave yang dapat disentuh dengan jari tangan 
ataupun stylus, touchscreen ini hanya dapat dioperasikan dengan jari 
saja. Tetapi dengan adanya sifat seperti ini, maka touchscreen ini tidak
 mudah terpengaruh oleh gangguan dari benda-benda lain di atasnya 
seperti misalnya debu atau air.&lt;br /&gt;
Tampilan layarnya pun sangat jernih daripada jenis Resistive touchscreen
 sehingga sangat cocok untuk digunakan dalam berbagai keperluan 
interaksi dalam publik umum seperti misalnya di restoran, kios 
elektronik, lokasi Point Of Sales, dan banyak lagi.&lt;span class=&quot;fullpost&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;b&gt;4. Resistive Screen&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaZ7CgZxVienJ62SVfm6EC_rz2Jtryo83gSfLwvg1dPW8S6aM0JkQT7wi26idI7fgZIabHdXkt9OZNZOGkVJ56B01Q2RwZ2QHW_KenCu98l5KKqBPjskbBJia3t_D6cQ3MJo5iDhGP4uM/s1600/030411_1538_TouchScreen11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;123&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaZ7CgZxVienJ62SVfm6EC_rz2Jtryo83gSfLwvg1dPW8S6aM0JkQT7wi26idI7fgZIabHdXkt9OZNZOGkVJ56B01Q2RwZ2QHW_KenCu98l5KKqBPjskbBJia3t_D6cQ3MJo5iDhGP4uM/s200/030411_1538_TouchScreen11.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Sistem
 resistif layarnya dilapisi oleh lapisan tipis berwarna metalik yang 
bersifat konduktif dan resistif terhadap sinyal-sinyal listrik. Maksud 
dari lapisan yang bersifat konduktif adalah lapisan yang bersifat mudah 
menghantarkan sinyal listrik, sedangkan lapisan resistif adalah lapisan 
yang menahan arus listrik.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; margin-left: 18pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Kedua
 lapisan ini dipisahkan oleh sebuah bintik-bintik transparan pemisah, 
sehingga lapisan ini pasti terpisah satu sama lain dalam keadaan normal.
 Pada lapisan konduktif tersebut juga mengalir arus listrik yang 
bertugas sebagai arus referensi.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; margin-left: 18pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; margin-left: 18pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;b&gt;5. Surface Acoustic Wave System&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; margin-left: 18pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; margin-left: 18pt; text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdOYJt5YhdmXeJ0hfJlWl3Hqs1raQRAyBysCzKFoyecvmktXOQpkpWqWO7MUMBUePMEczFLDmxq8C5ryGTl4NbdX5xSVzqKH5kwNqIkzc-_Oy0Hh9KI2IzUPx89hOSb7HoRgmTaIQ_8aY/s1600/030411_1538_TouchScreen31.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;165&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdOYJt5YhdmXeJ0hfJlWl3Hqs1raQRAyBysCzKFoyecvmktXOQpkpWqWO7MUMBUePMEczFLDmxq8C5ryGTl4NbdX5xSVzqKH5kwNqIkzc-_Oy0Hh9KI2IzUPx89hOSb7HoRgmTaIQ_8aY/s200/030411_1538_TouchScreen31.gif&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;/span&gt;Teknologi
 touchscreen ini memanfaatkan gelombang ultrasonik untuk mendeteksi 
kejadian di permukaan layarnya. Di dalam monitor touchscreen ini 
terdapat dua tranduser, pengirim dan penerima sinyal ultrasonik.&lt;br /&gt;
    &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; margin-left: 18pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Selain
 itu dilengkapi juga dengan sebuah reflektor yang berfungsi sebagai 
pencegah agar gelombang ultrasonic tetap berada pada area layar monitor.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Kedua
 tranduser ini dipasang dalam keempat sisi, dua vertikal dan dua 
horizontal. Ketika panel touchscreen-nya tersentuh, ada bagian dari 
gelombang tersebut yang diserap oleh sentuhan tersebut, misalnya 
terhalang oleh tangan, stylus, tuts, dan banyak lagi. Sentuhan tadi 
telah membuat perubahan dalam bentuk gelombang yang dipancarkan.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;fullpost&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;fullpost&quot;&gt;&lt;b&gt;Kekurangan Touchscreen&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Namun touchscreen ini juga bukannya tanpa kelemahan. Meskipun secara 
fisik kebal terhadap gangguan elemen-elemen luar, kinerja dari layar 
sentuh ini dapat diganggu oleh elemen-elemen seperti debu, air, dan 
benda-benda padat lainnya.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/5997429296031085431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/10/perkembangan-teknologi-touchscreen.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/5997429296031085431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/5997429296031085431'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/10/perkembangan-teknologi-touchscreen.html' title='Perkembangan Teknologi Touchscreen'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8Lv73eLViUn8AbprwSuAByAJL6XDHgbrvzXV6T-grCuqytSRpo-zpyT9e8LkbdcY07uiScOVcTH3AZx4qT0A1CA82lT65eFEejntsnl1cPr0KN_RMY0MCW1hKW4NwbPTgtGa5Rac4mRI/s72-c/fruit.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-6655517264356204596</id><published>2011-10-04T18:37:00.000+07:00</published><updated>2011-10-12T13:35:39.815+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mobile Technology"/><title type='text'>Perkembangan Jaringan Mobile</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu-QmOPCxG6aHDH4ROYD94d14JbykGFoxwy0_CTrFlkYcvRYTgWV0UeODyMHunjpzUkoxHuruxIVzWi9PFUF0LlmQRuPt4jSAHHVUwHmXevqszNaw17drtrdDnFcCcGR2xddzSjPkxlLc/s1600/jaringan.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;152&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu-QmOPCxG6aHDH4ROYD94d14JbykGFoxwy0_CTrFlkYcvRYTgWV0UeODyMHunjpzUkoxHuruxIVzWi9PFUF0LlmQRuPt4jSAHHVUwHmXevqszNaw17drtrdDnFcCcGR2xddzSjPkxlLc/s200/jaringan.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;Teknologi  komunikasi seakan benda hidup yang selalu tumbuh dan 
berkembang tiada  titik jenuh untuk mengalami peningkatan dari waktu ke 
waktunya. Dimulai  dari alat yang tradisional untuk berkomunikasi 
seperti surat dan  telegram lama-kelamaan beralih ke benda yang dikenal 
dengan telepon.  Sepertinya manusia juga tak pernah puas untuk 
mengembangkan  kemampuannya,&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;muncullah benda yang lebih mutakhir dan 
dapat mempermudah  segala proses komunikasi dengan orang lain seperti 
benda kecil dan  ringan yang ada dalam genggaman kita yang dapat dibawa 
kemana saja yaitu  &lt;i&gt;handphone&lt;/i&gt; atau telepon seluler.&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;1. Fourth-Generation Technology (4G)&lt;/b&gt;&lt;br /&gt;
4G adalah singkatan dari istilah dalam bahasa Inggris: fourth-generation  technology. Istilah ini umumnya digunakan mengacu kepada pengembangan  teknologi telepon seluler. 4G merupakan pengembangan dari teknologi 3G.  Nama resmi dari teknologi 4G ini menurut IEEE (Institute of Electrical  and Electronics Engineers) adalah “3G and beyond”.Teknologi 4G adalah  istilah serapan dari bahasa Inggris: fourth-generation technology.  Istilah ini umumnya digunakan untuk menjelaskan pengembangan teknologi  telepon seluler.&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;Sejarah:&lt;/span&gt;&lt;br /&gt;
Generasi pertama: hampir seluruh sistem pada generasi ini merupakan  sistem analog dengan kecepatan rendah (low-speed) dan suara sebagai  objek utama. Contoh: NMT (Nordic Mobile Telephone) dan AMPS (Analog  Mobile Phone System).&lt;br /&gt;
Generasi kedua: dijadikan standar komersial dengan format digital,  kecepatan rendah – menengah. Contoh: GSM dan CDMA2000 1xRTT.Generasi  ketiga: digital, mampu mentransfer data dengan kecepatan tinggi  (high-speed) dan aplikasi multimedia, untuk pita lebar (broadband).  Contoh: W-CDMA (atau dikenal juga dengan UMTS) dan CDMA2000  1xEV-DO.Antara generasi kedua dan generasi ketiga, sering disisipkan  Generasi 2,5 yaitu digital, kecepatan menengah (hingga 150 Kbps).  Teknologi yang masuk kategori 2,5 G adalah layanan berbasis data seperti  GPRS (General Packet Radio Service) dan EDGE (Enhance Data rate for GSM  Evolution) pada domain GSM dan PDN (Packet Data Network) pada domain  CDMA. 4G merupakan pengembangan dari teknologi 3G. Nama resmi dari  teknologi 4G ini menurut IEEE (Institute of Electrical and Electronics  Engineers) adalah “3G and beyond”. Sebelum 4G, High-Speed Downlink  Packet Access (HSDPA) yang kadangkala disebut sebagai teknologi 3,5G  telah dikembangkan oleh WCDMA sama seperti EV-DO mengembangkan CDMA2000.  HSDPA adalah sebuah protokol telepon genggam yang memberikan jalur  evolusi untuk jaringan Universal Mobile Telecommunications System (UMTS)  yang akan dapat memberikan kapasitas data yang lebih besar (sampai 14,4  Mbit/detik arah turun).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;Definisi:&lt;/span&gt;&lt;br /&gt;
Sistem 4G akan dapat menyediakan solusi IP yang komprehensif dimana  suara, data, dan arus multimedia dapat sampai kepada pengguna kapan saja  dan dimana saja, pada rata-rata data lebih tinggi dari generasi  sebelumnya. Belum ada definisi formal untuk 4G. Bagaimanapun, terdapat  beberapa pendapat yang ditujukan untuk 4G, yakni: 4G akan merupakan  sistem berbasis IP terintegrasi penuh. Ini akan dicapai setelah  teknologi kabel dan nirkabel dapat dikenversikan dan mampu menghasilkan  kecepatan 100Mb/detik dan 1Gb/detik baik dalam maupun luar ruang dengan  kualitas premium dan keamanan tinggi. 4G akan menawarkan segala jenis  layanan dengan harga yang terjangkau. Setiap handset 4G akan langsung  mempunyai nomor IP v6 dilengkapi dengan kemampuan untuk berinteraksi  internet telephony yang berbasis Session Initiation Protocol (SIP).  Semua jenis radio transmisi seperti GSM, TDMA, EDGE, CDMA 2G, 2.5G akan  dapat digunakan, dan dapat berintegrasi dengan mudah dengan radio yang  di operasikan tanpa lisensi seperti IEEE 802.11 di frekuensi 2.4GHz  &amp;amp; 5-5.8Ghz, bluetooth dan selular. Integrasi voice dan data dalam  channel yang sama. Integrasi voice dan data aplikasi  SIP-enabled.Teknologi 4G di IndonesiaSecara sederhana, dapat diartikan  bahwa teknologi 1G adalah telepon analog / PSTN yang menggunakan  seluler. Sementara teknologi 2G, 2.5G, dan 3G merupakan ISDN. Indonesia  secara umum pada saat ini baru memasuki tahap 2.5G. Berkaitan dengan  teknologi 4G, SIP adalah protokol inti dalam internet telephony[1] yang  merupakan evolusi terkini dari Voice over Internet Protocol maupun  Telephony over Internet Protocol. Teknologi tersebut banyak di  perdebatkan oleh operator, pemerintah dan DPR belakangan ini. Tidak lama  lagi internet telephony akan menjadi tulang punggung utama  infrastruktur telekomunikasi. Teknologi internet telephony memungkinkan  pembangun infrastruktur telekomunikasi rakyat secara swadaya masyarakat  (tanpa Bank Dunia, IMF maupun ADB) bahkan mungkin&lt;br /&gt;
tanpa kontrol pemerintah sama sekali. Dengan teknologi SIP dalam 4G,  nomor telepon PSTN hanyalah sebagian kecil dari identifikasi telepon.  Bagian besarnya akan dilakukan menggunakan URL. Kita tidak lagi perlu  bergantung pada nomor telepon yang dikendalikan oleh pemerintah untuk  berkomunikasi via internet-telepon. Infrastruktr internet telephony  memungkinkan kita untuk menyelenggarakan sendiri banyak hal tanpa  tergantung lisensi pemerintah dan tidak melanggar hukum. Teknologi 4G  juga akan menyebabkan kemunduran bagi teknologi Inernet Network (IN)  yang saat ini merupakan infrastruktur telekomunikasi yang digunakan  berbagai provider. Hal tersebut disebabkan terbukanya jalur arus bawah  yang dapat didownload dan diakses gratis dari internet.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Saat ini kita dapat menyaksikan bagaimana pengguna ponsel dengan  bangga memamerkan penggunaan fitur canggih di ponsel 3G (baca: triji)  seperti fitur video calling yang memungkinkan penggunanya saling melihat  muka dengan pihak yang dihubunginya. Begitu pun dengan vendor penyedia  layanan 3G seperti, Telkomsel, Indosat, Excelcomindo Pratama, Mobile-8  (Fren) dan lain-lainya. Tapi kini, perkembangan teknologi selular begitu  cepat, seperti kita ketahui teknologi telekomunikasi semula hanya  menggunakan sistem analog, dan terus tumbuh sampai dengan generasi ke-3  yang kita kenal sekarang dengan 3G. Namun begitu teknologi 3G pun akan  segera beralih ke 4G.&lt;br /&gt;
4G adalah singkatan dari istilah dalam bahasa Inggris: fourth-generation  technology. Istilah ini umumnya digunakan mengacu kepada pengembangan  teknologi telepon seluler. 4G merupakan pengembangan dari teknologi 3G.  Nama resmi dari teknologi 4G ini menurut IEEE (Institute of Electrical  and Electronics Engineers) adalah “3G and beyond”. Salah satu ciri khas  teknologi 4G ini adalah seluruh jaringan sudah akan berbasis IP.  Teknologi yang dipakai adalah teknologi internet telepon menggunakan  Session Initiation Protocol (SIP). Namun teknologi 4G kini belum bisa  didefinisikan secara jelas. Sampai sekarang belum ada standarisasi untuk  4G yang telah disepakati oleh para pihak yang berkompeten di bidang  tekonologi komunikasi tanpa kabel ini. Selain berbasis IP, teknologi 4G  ini memiliki ciri khas bahwa ponsel ini masih akan berfungsi dengan baik  bila penggunannya berkomunikasi dengan menggunakan piranti 4G di dalam  kendaraan dengan kecepatan 150 Km/jam dengan kecepatan transfer mencapai  54 Mbps. Padahal di atas kertas kecepatan 4G sesungguhnya bisa mencapai  100 Mbps di lingkungan luar rumah (bergerak), sedangkan 1GBps pada  kondisi tidak bergerak (statisioner). Tidak hanya itu, kapasitas data  yang melalui jaringan 4G akan jauh lebih besar daripada 3G sehingga  pengunduhan data yang mencapai puluhan, bahkan ratusan MB akan mudah  dicapai dalam waktu singkat. Sebagai contoh, dengan ponsel 3G, kita baru  dapat mengunduh klip video dan klip musik yang berdurasi tidak begitu  panjang. Sedangkan dengan 4G yang akan berbasis jaringan IP sepenuhnya,  kita tidak hanya dapat mengunduh satu film utuh ke dalam satu ponsel 4G  ketika sedang bergerak, juga menyaksikan tayangan gambar televisi yang  berkualitas tinggi (high definition TV content) dan menyaksikan lawan  bicara kita yang terlihat jelas dan mulus geraknya, tidak  tersendat-sendat seperti sekarang dengan 3G melalui video calling. Tidak  hanya itu, kita juga dapat melakukan video chat dengan mudah. Juga  fitur video conferencing yang bisa lebih dari 2 situs yang dilakukan  secara simultan. Dengan kata lain, trafik multimedia akan dominan pada  penggunaan teknologi 4G di masa mendatang. Tentu saja browsing internet  tanpa kabel akan makin lebih cepat dan makin menyenangkan tanpa  terganggu dengan waktu tunda (delay time) karena masalah kongesti pada  lalu lintas data di jaringan di masa kini akan teratasi dengan teknologi  4G. Yang paling menyenangkan karena biaya untuk menikmati fitur-fitur  4G itu diprediksi akan lebih murah daripada sekarang karena biaya untuk  mengaplikasikan teknologi 4G akan lebih murah daripada teknologi 3G  ataupun HDSPA (3,5 G).&lt;br /&gt;
Menurut pakar telematika Indonesia, Onno W. Purbo, “Untuk teknologi 4G,  setiap handset 4G akan langsung mempunyai nomor IP v6 dilengkapi dengan  kemampuan untuk berinteraksi internet telephony yang berbasis Session  Initiation Protocol (SIP). Semua jenis radio transmisi seperti GSM,  TDMA, EDGE, CDMA 2G, 2.5G akan dapat digunakan, dan dapat berintegrasi  dengan mudah dengan radio yang di operasikan tanpa lisensi seperti IEEE  802.11 di frekuensi 2.4GHz &amp;amp; 5-5.8Ghz, bluetooth dan selular.  Integrasi voice dan data dalam channel yang sama. Integrasi voice dan  data aplikasi SIP-enabled.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Gila-nya dengan teknologi SIP yang berada di belakang 4G, nomor  telepon +62 21 123 4567 hanya lah subset, bagian kecil daripada  pengenalan / identifikasi telepon. Sebagian besar identifikasi /  penomoran telepon akan dilakukan menggunakan URL seperti  sip:onno@indo.net.id …. Dengan bertumpu pada URL, dunia menjadi lebih  menarik karena kita tidak perlu lagi tergantung pada nomor telepon yang  di kuasasi pemerintah cq. POSTEL untuk berkomunikasi internet telepon.  Kalau kita cukup gila, sebetulnya dalam banyak hal kita dapat  menyelenggarakan sendiri infrastruktur internet telephony tanpa perlu  tergantung pada ijin / lisensi pemerintah tanpa melanggar hukum, dengan  software yang dibuat sendiri tanpa mengeluarkan banyak devisa. Tak perlu  lah kita mengeluarkan US$1000 / SST seperti yang di gembar gemborkan  saat ini, jika saja kreatifitas anak bangsa tidak di matikan. Dalam 3G,  servis suara yang dihasilkan pada dasarnya sama dengan servis suara di  ISDN. Handset digital selular pada dasarnya sebuah handset ISDN.  Sialnya, ISDN pada kenyataannya tidak berhasil dengan baik untuk  mendeploy servis suara yang baru maupun integrasi data / suara. Kita  cukup beruntung dengan adanya 3G ternyata membuka kesempatan untuk uji  coba teknologi Internet seperti Session Initiation Protocol (SIP) maupun  menggPerusahaan asal Swedia, TeliaSonera, telah mengimplementasikan  jaringan mobile 4G di Stockholm, Swedia, dan Oslo, Norwegia.  Pengembangan LTE tersebut sesuai dengan jadwal project dan membuat  TeliaSonera menjadi yang pertama di dunia atas implementasi wireless 4G.  TeliaSonera menjadi carrier wireless 4G pertama untuk membuat jaringan  4G.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Akses jaringan 4G dapat diakses via sebuah dongle Samsung USB, namun  handset yang bisa 4G juga support untuk jaringan ini, akan segera hadir  di tahun 2010. Teknologi 4G tersebut secara teori dengan kecepatan data  100Mbps, namun TeliaSonera mempromosikan layanan 4G tersebut dengan  range dari 20Mbps hingga 80Mbps.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Layanan TeliaSonera 4G ini tetap tujuh kali lipat lebih cepat  dibandingkan jaringan AT&amp;amp;T 3G, yang dipertimbangkan menjadi jaringan  3G tercepat di US. Ketika 4G dipertimbangkan untuk menggantikan  jaringan 3G di seluruh dunia, maka bandwith pun harus meningkat.  Generasi 4G berbasis teknologi Long Term Evolution (LTE) memiliki  kecepatan data hingga 100MB per second, sekitar 10 kali lebih cepat  daripada jaringan 3G.unaan IP v6 (saat ini semua ISP komersial di  Indonesia menggunakan IP v4 yang lebih tua). Ujicoba untuk integrasi SIP  &amp;amp; IP v6 ke dalam 3G di lakukan dalam inisiatif 3GPP.Dengan  mengandalkan jalur internet dan murahnya koneksi internet, tentu sangat  menggembirakan dalam penggunaan teknologi 4G ini dalam berkomunikasi  dibandingkan dEngan teknologi komunikasi yang ada saat ini. Di masa yang  akan datang, berkomunikasi akan dilakukan dengan menggunakan laptop, PC  ataupun PDA yang mempunyai koneksi Wifi untuk menghubungkan ke  internet, atau juga handset/ponsel tersendiri yang bisa terhubung ke  internet. Ini akan menjadi suatu revolusi teknologi komunikasi yang  besar dikarenakan akan terciptanya komunikasi yang murah bagi  masyarakat.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Perusahaan asal Swedia, TeliaSonera, telah mengimplementasikan  jaringan mobile 4G di Stockholm, Swedia, dan Oslo, Norwegia.  Pengembangan LTE tersebut sesuai dengan jadwal project dan membuat  TeliaSonera menjadi yang pertama di dunia atas implementasi wireless 4G.  TeliaSonera menjadi carrier wireless 4G pertama untuk membuat jaringan  4G.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Akses jaringan 4G dapat diakses via sebuah dongle Samsung USB, namun  handset yang bisa 4G juga support untuk jaringan ini, akan segera hadir  di tahun 2010. Teknologi 4G tersebut secara teori dengan kecepatan data  100Mbps, namun TeliaSonera mempromosikan layanan 4G tersebut dengan  range dari 20Mbps hingga 80Mbps.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Layanan TeliaSonera 4G ini tetap tujuh kali lipat lebih cepat  dibandingkan jaringan AT&amp;amp;T 3G, yang dipertimbangkan menjadi jaringan  3G tercepat di US. Ketika 4G dipertimbangkan untuk menggantikan  jaringan 3G di seluruh dunia, maka bandwith pun harus meningkat.  Generasi 4G berbasis teknologi Long Term Evolution (LTE) memiliki  kecepatan data hingga 100MB per second, sekitar 10 kali lebih cepat  daripada jaringan 3G.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;2. third-generation technology (3G)&lt;/b&gt;&lt;br /&gt;
3G (dibaca: triji) adalah singkatan dari istilah dalam bahasa Inggris:  third-generation technology. Istilah ini umumnya digunakan mengacu  kepada perkembangan teknologi telepon nirkabel (wireless).&lt;br /&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;Sejarahnya:&lt;/span&gt;&lt;br /&gt;
1. Generasi pertama: analog, kecepatan rendah (low-speed), cukup untuk  suara. Contoh: NMT (Nordic Mobile Telephone) dan AMPS (Analog Mobile  Phone System)&lt;br /&gt;
2. Generasi kedua: digital, kecepatan rendah – menengah. Contoh: GSM dan CDMA2000 1xRTT&lt;br /&gt;
3. Generasi ketiga: digital, kecepatan tinggi (high-speed), untuk pita  lebar (broadband). Contoh: W-CDMA (atau dikenal juga dengan UMTS) dan  CDMA2000 1xEV-DO.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Antara generasi kedua dan generasi ke-3, sering disisipkan Generasi  2,5, yaitu digital, kecepatan menengah (hingga 150 Kbps). Teknologi yang  masuk kategori 2,5G adalah layanan berbasis data seperti GPRS (General  Packet Radio Service) &amp;amp; EDGE (Enhance Data rate for GSM Evolution)  pada domain GSM dan PDN (Packet Data Network) pada domain CDMA.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Secara umum, ITU-T, sebagaimana dikutip oleh FCC mendefinisikan 3G  sebagai sebuah solusi nirkabel yang bisa memberikan kecepatan akses:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
- Sebesar 144 Kbps untuk kondisi bergerak cepat (mobile).&lt;br /&gt;
- Sebesar 384 Kbps untuk kondisi berjalan (pedestrian).&lt;br /&gt;
- Sebesar 2 Mbps untuk kondisi statik di suatu tempat.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;Teknologi 3G&lt;/span&gt;&lt;br /&gt;
Pada saat ini ada dua cabang dari pengembangan 3G, yaitu dari sisi GSM  (Global System for Mobile Communication)yang dipelopori oleh 3G  Partnership Project dan CDMA (Code Division Multiple Access) yang  dipelopori oleh 3G Partnership Project 2 (3GPP2). Kedua teknologi tidak  kompatibel dan sesungguhnya saling berkompetisi.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Salah satu alasan mengapa layanan 3G dapat memberikan throughput yang  lebih besar adalah karena penggunaan teknologi spektrum tersebar yang  memungkinkan data masukan yang hendak ditransimisikan disebar di seluruh  spektrum frekuensi. Selain mendapatkan pita lebar yang lebih besar,  layanan berbasis spektrum tersebar jauh lebih aman daripada timeslot  dan/atau frequency slot.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Jaringan 3G bukan upgrade dari 2G; operator 2G yang berafiliasi  dengan 3GPP perlu untuk mengganti banyak komponen untuk bisa memberikan  layanan 3G. Sedangkan operator 2G yang berafiliasi dengan teknologi  3GPP2 lebih mudah dalam upgrade ke 3G karena berbagai network element  nya sudah didesain untuk ke arah layanan nirkabel pita lebar (broadband  wireless).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Jaringan Telepon Telekomunikasi selular telah meningkat menuju  penggunaan layanan 3G dari 1999 hingga 2010. Jepang adalah negara  pertama yang memperkenalkan 3G secara nasional dan transisi menuju 3G di  Jepang sudah dicapai pada tahun 2006. Setelah itu Korea menjadi  pengadopsi jaringan 3G pertama dan transisi telah dicapai pada awal  tahun 2004, memimpin dunia dalam bidang telekomunikasi.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Operator dan jaringan UMTS Pada tahun 2005, evolusi jaringan 3G  sedang dijalankan untuk beberapa tahun dikarenakan kapasitas yang  terbatas dari jaringan 2G yang ada. Jaringan 2G diciptakan dengan tujuan  utama adalah data suara dan transmisi yang lambat. Dikarenakan cepatnya  arus perubahan pada permintaan pengguna, kebutuhan akan nirkabel mereka  tidak terpenuhi.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
“2.5G” (Dan juga 2,75G) adalah teknologi seperti pelayanan data  i-mode, telepon berkamera, pertukaran rangkaian data berkecepatan tinggi  (atau disebut juga High-Speed Circuit-Switched Data atau disingkat  HSCSD) dan Pelayanan paket radio umum (atau dikenal dengan General  Packet Radio Service atau GPRS) diciptakan untuk menyediakan beberapa  fungsi utama seperti jaringan 3G, tapi tanpa transisi penuh ke jaringan  3G. Pelayanan-Pelayanan ini diciptakan untuk memperkenalkan kemungkinan  dari penerapan teknologi nirkabel untuk pengguna dan penigkatan  permintaan untuk pelayanan 3G.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;3. Universal Mobile Telecommunications System (UMTS)&lt;/b&gt;&lt;br /&gt;
UMTS (bahasa Inggris: Universal Mobile Telecommunications System) adalah  salah satu teknologi telepon genggam 3G (generasi ke-3). Sekarang ini  bentuk yang paling banyak digunakan adalah W-CDMA yang distandarisasi  oleh 3GPP.&lt;br /&gt;
Untuk membedakan UMTS dari teknologi 3G lainnya, UMTS seringkali  dipasarkan sebagai 3GSM, menekankan dasar 3G dari teknologi ini.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;4. High-Speed Downlink Packet Access (HSDPA)&lt;/b&gt;&lt;br /&gt;
High-Speed Downlink Packet Access (HSDPA) adalah sebuah protokol telepon  genggam dan kadangkala disebut sebagai teknologi 3,5G. HSDPA fase  pertama berkapasitas 4,1 Mbps. Kemudian menyusul fase 2 berkapasitas 11  Mbps dan kapasitas maksimal downlink peak data rate hingga mencapai 14  Mbit/s. Teknologi ini dikembangkan dari WCDMA sama seperti EV-DO  mengembangkan CDMA2000. HSDPA memberikan jalur evolusi untuk jaringan  Universal Mobile Telecommunications System (UMTS) yang memungkinkan  untuk penggunaan kapasitas data yang lebih besar (sampai 14,4 Mbit/detik  arah turun).&lt;br /&gt;
HSDPA merupakan evolusi dari standar W-CDMA dan dirancang untuk  meningkatkan kecepatan transfer data 5x lebih tinggi. HSDPA  memdefinisikan sebuah saluran W-CDMa yang baru, yaitu high-speed  downlink shared channel (HS-DSCH) yang cara operasinya berbeda dengan  saluran W-CDMA yang ada sekarang. Hingga kini penggunaan teknologi HSDPA  hanya pada komunikasi arah bawah menuju telepon genggam.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;Kecepatan unduh datanya :&lt;/span&gt;&lt;br /&gt;
- Di lingkungan perumahan teknologi ini dapat melakukan unduh data hingga berkecepatan 3,7 Mbps.&lt;br /&gt;
- Dalam keadaan bergerak seseorang yang sedang berkendaraan di jalan tol  berkecepatan 100 km/jam dapat mengakses internet berkecepatan 1,2 Mbps.&lt;br /&gt;
- Di lingkungan perkantoran yang padat pengguna dapat menikmati streaming video dengan perkiraan kecepatan 300 Kbps.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;Kelebihan HSDPA&lt;/span&gt;&lt;br /&gt;
Kelebihan HSDPA adalah mengurangi tertundanya pengunduhan data (delay)  dan memberikan umpan balik yang lebih cepat saat pengguna menggunakan  aplikasi interaktif seperti mobile office atau akses Internet kecepatan  tinggi untuk penggunaan fasilitas permainan atau mengunduh audio dan  video. Kelebihan lain HSDPA, meningkatkan kapasitas sistim tanpa  memerlukan spektrum frekuensi tambahan. Hal ini menyebabkan berkurangnya  biaya layanan mobile data secara signifikan.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;5. General Packet Radio Service (GPRS)&lt;/b&gt;&lt;br /&gt;
GPRS (singkatan bahasa Inggris: General Packet Radio Service, GPRS)  adalah suatu teknologi yang memungkinkan pengiriman dan penerimaan data  lebih cepat jika dibandingkan dengan penggunaan teknologi Circuit Switch  Data atau CSD. Sering disebut pula dengan teknologi 2,5G&lt;br /&gt;
Sistem GPRS dapat digunakan untuk transfer data (dalam bentuk paket  data) yang berkaitan dengan e-mail, data gambar (MMS), dan penelusuran  (browsing) internet.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
GPRS merupakan sistem transmisi berbasis paket untuk GSM yang  menggunakan prinsip ‘tunnelling’. Ia menawarkan laju data yang lebih  tinggi. Laju datanya secara kasar sampai 160 kbps dibandingkan dengan  9,6kbps yang dapat disediakan oleh rangkaian tersakelar GSM. Kanal-kanal  radio ganda dapat dialokasikan bagi seorang pengguna dan kanal yang  sama dapat pula digunakan secara berbagi (’sharing’) di antara beberapa  pengguna sehingga menjadi sangat efisien.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Dari segi biaya, pentarifan diharapkan hanya mengacu pada volume  penggunaan. Penggunanya ditarik biaya dalam kaitannya dengan banyaknya  byte yang dikirim atau diterima, tanpa memperdulikan panggilan, dengan  demikian dimungkinkan GPRS akan menjadi lebih cenderung dipilih oleh  pelanggan untuk mengaksesnya daripada layanan-layanan IP.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Dalam teorinya GPRS menjanjikan kecepatan mulai dari 56 kbps sampai  115 kbps, sehingga memungkinkan akses internet, pengiriman data  multimedia ke komputer, notebook dan handheld computer. Namun, dalam  implementasinya, hal tersebut sangat tergantung faktor-faktor sebagai  berikut:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
- Konfigurasi dan alokasi time slot pada level BTS&lt;br /&gt;
- Software yang dipergunakan&lt;br /&gt;
- Dukungan fitur dan aplikasi ponsel yang digunakan&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Ini menjelaskan mengapa pada saat-saat tertentu dan di lokasi  tertentu akses GPRS terasa lambat, bahkan lebih lambat dari akses CSD  yang memiliki kecepatan 9,6 kbps.&lt;br /&gt;
Komponen-komponen utama jaringan GPRS adalah :&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
- GGSN (Gateway GPRS Support Node): gerbang penghubung jaringan GPRS  ke jaringan internet. Fungsi dari komponen ini adalah sebagai interface  ke PDN (Public Data Network), information routing, network screening,  user screening, address mapping.&lt;br /&gt;
- SGSN (Serving GPRS Support Node): gerbang penghubung jaringan BSS/BTS  ke jaringan GPRS. Komponen ini berfungsi untuk mengantarkan paket data  ke MS, update pelanggan ke HLR, registrasi pelanggan baru.&lt;br /&gt;
- PCU : komponen di level BSS yang menghubungkan terminal ke jaringan GPRS&lt;br /&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;Cara Kerja GPRS:&lt;/span&gt;&lt;br /&gt;
SGSN bertugas :&lt;br /&gt;
1. Mengirim paket ke Mobile Station (MS) dalam satu area&lt;br /&gt;
2. Mengirim sejumlah pertanyaan ke HLR untuk memperoleh profile data pelanggan GPRS (management mobility)&lt;br /&gt;
3. Mendeteksi MS-GPRS yang baru dalam suatu area servis yang menjadi tanggung jawabnya (location management)&lt;br /&gt;
4. SGSN dihubungkan ke BSS pada GSM dengan koneksi Frame Relay melalui PCU (Packet Control Unit) di dalam BSC&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
GGSN bertugas :&lt;br /&gt;
1. Sebagai interface ke jaringan IP external seperti : public internet atau mobile service provider&lt;br /&gt;
2. Meng-update informasi routing dari PDU ( Protokol Data Units ) ke SGSN.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
GPRS menggunakan sistem komunikasi packet switch sebagai cara untuk  mentransmisikan datanya. Packet switch adalah sebuah sistem di mana data  yang akan ditransmisikan dibagi menjadi bagian-bagian kecil (paket)  lalu ditransmisikan dan diubah kembali menjadi data semula. Sistem ini  dapat mentransmisikan ribuan bahkan jutaan paket per detik. Transmisi  dilakukan melalui PLMN (Public Land Mobile Network) dengan menggunakan  IP backbone. Karena memungkinkan untuk pemakaian kanal transmisi secara  bersamaan oleh pengguna lain maka biaya akses GPRS, secara teori, lebih  murah daripada biaya akses CSD.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
GPRS didesain untuk menyediakan layanan transfer packet data pada  jaringan GSM dengan kecepatan yang lebih baik dari GSM. Kecepatan yang  lebih baik ini didapat dengan menggunakan coding scheme (CS) yang  berbeda dari GSM.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;6. Enhanced Data for Global Evolution (EDGE)&lt;/b&gt;&lt;br /&gt;
EDGE atau Enhanced Data for Global Evolution adalah teknologi evolusi  dari GSM dan IS-136. Tujuan pengembangan teknologi baru ini adalah untuk  meningkatkan kecepatan transmisi data, efesiensi spektrum, dan  memungkinkannya penggunaan aplikasi-aplikasi baru serta meningkatkan  kapasistas.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Pengaplikasian EDGE pada jaringan GSM fase 2+ seperti GPRS dan HSCSD  dilakukan dengan penambahan lapisan fisik baru pada sisi Radio Access  Network (RAN). Jadi tidak ada berubahan di sisi jaringan inti seperti  MSC, SGSN, ataupun GGSN.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;Kapasitas EDGE Sebagai Teknologi Data Transfer Tingkat Advance&lt;/span&gt;&lt;br /&gt;
Pada GPRS menawarkan kecepatan data sebesar 115 kbps, dan secara teori  dapat mencapai 160 kbps. Sedangkan pada EDGE kecepatan datanya sbesar  384 kbps, dan secara teori dapat mencapai 473,6 kbps. Secara umum  kecepatan EDGE tiga kali lebih besar dari GPRS. Hal ini dimungkinkan  karena pada EDGE digunakan teknik modulasi (EDGE menggunakan 8PSK,GPRS  menggunakan GMSK) dan metode toleransi kesalahan yang berbeda dengan  GPRS, dan juga mekanisme adaptasi pranala yang diperbaiki. EDGE juga  menggunakan coding scheme yang berbeda dengan GPRS. Dalam EDGE dikenal 9  macam skema pengkodean, sedangkan di GPRS hanya ada 4 skema pengkodean.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
EDGE mengalami perkembangan dari beberapa generasi terdahulu.  Perkembangan teknologi ini didahului oleh AMPS sebagai teknologi  komunikasi seluler generasi pertama pada tahun 1978, hingga sekarang  (tahun 2006), perkembangan nya sudah sampai pada teknologi generasi  ke-4, walaupun masih dalam tahap penelitian dan uji coba. GSM sendiri  sebagai salah satu teknologi komunikasi mobile generasi kedua, merupakan  teknologi yang saat ini paling banyak digunakan di berbagai negara.  Dalam perkembangannya, GSM yang mampu menyalurkan komunikasi suara dan  data berkecepatan rendah (9.6 – 14.4 kbps), kemudian berkembang menjadi  GPRS yang mampu menyalurkan suara dan juga data dengan kecepatan yang  lebih baik,115 kbps.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Pada fase selanjutnya, meningkatnya kebutuhan akan sebuah system  komunikasi mobile yang mampu menyalurkan data dengan kecepatan yang  lebih tinggi, dan untuk menjawab kebutuhan ini kemudian diperkenalkanlah  EDGE (Enhanced Data rates for GSM Evolution) yang mampu menyalurkan  data dengan kecepatan hingga 3 kali kecepatan GPRS, yaitu 384 kbps.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Pada pengembangan selanjutnya, diperkenalkanlah teknologi generasi  ketiga, salah satunya UMTS (Universal Mobile Telecommunication Service),  yang mampu menyalurkan data dengan kecepatan hingga 2 Mbps. Dengan  kecepatan hingga 2 Mbps, jaringan UMTS dapat melayani aplikasi-aplikasi  multimedia (video streaming, akses internet ataupun video conference)  melalui perangkat seluler dengan cukup baik. Perkembangan di dunia  telekomunikasi seluler ini diyakini akan terus berkembang, hingga  nantinya diperkenalkan teknologi-teknologi baru yang lebih baik dari  yang ada saat ini. Akhir-akhir ini, para ilmuwan berusaha mengembangkan  teknologi telekomunikasi seluler dengan jangkauan yang sangat lebar,  tingkat mobilitas tinggi, layanan yang terintegrasi, dan berbasikan IP  (mobile IP). Teknologi ini diperkenalkan dengan nama “Beyond 3G” atau  4G.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;Kapasitas dan Kapabilitas EDGE Sebagai Teknologi Mobile Generasi Ketiga (3G)&lt;/span&gt;&lt;br /&gt;
Sebagaimana telah disinggung pada poin sebelumnya, EDGE memiliki  keunggulan dalam transfer data, misalnya, teknologi EDGE bisa tiga kali  lebih cepat dari teknologi GPRS. Artinya, bila pelanggan selular ingin  mendownload pesan MMS dengan teknologi GPRS memerlukan waktu puluhan  detik, tapi dengan teknologi EDGE, hanya perlu waktu beberapa detik  saja.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Di Indonesia, teknologi EDGE sudah berkembang selama beberapa tahun  sejak tahun terakhir EDGE. Perkembangan teknologi GSM di Indonesia  bergulir secara pesat dimulai dengan penggelaran secara serempak dual  band (GSM 900 dan 1800) dan dilanjutkan penggelaran GPRS secara  serempak, telah berhasil menghantar industri memasuki fase 2,5 secara  tidak terasa. Belum lama teknologi 2,5G bergulir, lahirlah teknologi 3G  yang membawa revolusi dalam teknologi seluler Indonesia. Beberapa  provider di Indonesia, seperti Indosat, Telkomsel, dan Excelcomindo  berlomba- lomba menciptakan inovasi baru dengan mengusung teknologi 3G.  Banyak masyarakat indonesia terutama bagi mereka yang tinggal di kota  besar deperti Jakarta, Bandung, Medan, dan Surabaya yang menggunakan  berbagai layanan 3G yang tersedia seperti panggilan video, download  content, akses internet kecepatan tinggi, dll.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Setelah kurang lebih 2 tahun diperkenalkan 3G di Indonesia sekarang  sudah muncul evolusi dari 3G yang dikenal dengan nama HSDPA atau 3,5G.  HSDPA atau High Speed Downlink Packet Access merupakan teknologi yang  berjalan pada platform 3G pada channel baru yang disebut High Speed  Downlink Shared Channel (HS-DSCH). Dengan HDSPA, kecepatan downlink  secara teori dapat mencapai 3,6 Mbps bandingkan dengan 3G yang hanya  mencapai 384 Kbps. Karena masih berjalan pada platform 3G namun dengan  kecepatan melampaui kecepatan 3G standar maka teknologi ini disebut juga  sebagai 3,5G. Sebenernya perkembangan teknologi HSDPA pada 3G hampir  mirip dengan perkembangan teknologi EDGE atau Enhanced GPRS (EGPRS) pada  GPRS. Perlu diketahui, EDGE memiliki kecepatan downlink mencapai 236  Kbps, cukup cepat jika dibandingkan dengan GPRS standar yang memiliki  kecepatan sekitar 50 Kbps. Karena hal tersebut pula teknologi EDGE atau  EGPRS juga dikenal dengan nama teknologi 2,75G.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/6655517264356204596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/10/perkembangan-jaringan.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/6655517264356204596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/6655517264356204596'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/10/perkembangan-jaringan.html' title='Perkembangan Jaringan Mobile'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu-QmOPCxG6aHDH4ROYD94d14JbykGFoxwy0_CTrFlkYcvRYTgWV0UeODyMHunjpzUkoxHuruxIVzWi9PFUF0LlmQRuPt4jSAHHVUwHmXevqszNaw17drtrdDnFcCcGR2xddzSjPkxlLc/s72-c/jaringan.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-3948096728409707412</id><published>2011-09-24T21:08:00.000+07:00</published><updated>2011-10-12T13:35:53.080+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mobile Technology"/><title type='text'>Samsung Galaxy Tab 10.1</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBDI_WnipixnU8GffJ3fQIqwuxo3qhLakSWy2_TkW_osmEDKV0uFBpYOBQFPBnO2PUtTQvgpgDRw2AvLq61-ePVngvt8oZh45YGXLlcT2rUnrxlyyqIg4kxFAYlaYaysX5ElEVXY0ufDs/s1600/samsung-galaxy-tab-101.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;141&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBDI_WnipixnU8GffJ3fQIqwuxo3qhLakSWy2_TkW_osmEDKV0uFBpYOBQFPBnO2PUtTQvgpgDRw2AvLq61-ePVngvt8oZh45YGXLlcT2rUnrxlyyqIg4kxFAYlaYaysX5ElEVXY0ufDs/s200/samsung-galaxy-tab-101.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Samsung kini memperluas tabletnya ke arena 10 inci. Berkompetisi  head-to-head dengan iPad, mereka resmi mengumumkan Galaxy Tab 10.1&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Seperti namanya, Galaxy Tab 10.1 memang mengandalkan layar 10,1 inci  atau sedikit lebih besar dibanding iPad yang berdimensi 9,7 inci.  Kegiatan menonton video atau menjelajah dunia maya pun akan lebih  terpuaskan. &lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Yang istimewa lagi, tablet ini telah membenamkan platform versi terbaru,  Android 3.0 (Honeycomb). Artinya, Galaxy Tab 10.1 bisa jadi tablet  kedua setelah Motorola Xoom yang berbasiskan “sarang madu”. &lt;br /&gt;
Spesifikasi Galaxy Tab 10.1 pun dapat dibilang selangkah lebih maju  dibanding pendahulunya. Tablet ini diotaki prosesor Tegra 2 dual core  1GHz, kamera belakang 8MP (+ autofokus dan lampu kilat) dan kamera depan  2MP, serta kapabilitas HSPA+ up to 21Mbps. Kemampuan perekaman dan  pemutaran video juga telah mencapai Full-HD. Untuk kapasitas memori,  tersedia pilihan 16GB dan 32GB.&lt;br /&gt;
Belum ada keterangan resmi mengenai jadwal rilis serta harga yang  dibandrol Samsung untuk tablet generasi keduanya ini. Namun, menurut  Engadget, Galaxy Tab 10.1 diperkirakan hadir di pasar Asia dan Eropa  pada Maret 2011.&lt;br /&gt;
Sekadar informasi, penjualan sang &quot;kakak&quot;, Samsung Galaxy Tab,  telah menembus angka 1 juta pada awal Desember 2010 silam.&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Spesifikasi:&lt;br /&gt;
&lt;br /&gt;
* Jaringan:  HSPA+ 21Mbps 850/900/1900/2100, Edge/GPRS 850/900/1800/1900&lt;br /&gt;
* Sistem Operasi:  Android 3.0 (Honeycomb)&lt;br /&gt;
* Dimensi: 246.2×170.4×10.9mm Bobot: 599g&lt;br /&gt;
* Display: 10.1” 1280×800 (WXGA) TFT&lt;br /&gt;
* Processor: 1GHz Dual Core application processor&lt;br /&gt;
* Kamera Utama: 8.0-Mega Pixel Camera AF with LED Flash&lt;br /&gt;
* Kamera Sekunder: 2.0 Mega Pixel&lt;br /&gt;
* Video: MPEG4/H263/H264&lt;br /&gt;
* Playback: 1080p FullHD Video @30fpsRecording: 1080p FullHD Video @ 24fps&lt;br /&gt;
* Audio: MP3, AAC, AAC+, eAAC+, OGG, MIDI, AMR-NB/WB, 3.5mm Ear Jack, Stereo Speaker&lt;br /&gt;
* Fitur lain: Android Market for more applications and contents,  Android UI / Android BrowserGoogle Mobile Service: Google Talk Video  Chat, Google Maps etc., Sensor Gyroscope, Accelerometer, Digital  Compass, Proximity&lt;br /&gt;
* Konektivitas: WiFi 802.11 (a/b/g/n), Bluetooth technology v2.1 + EDR, USB 2.0,&lt;br /&gt;
* Memori: 16GB/32GB&lt;br /&gt;
* Battery: 6860mAh&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Perbandingan dengan&amp;nbsp;&lt;i&gt; ipad2 dan Huawei s7&amp;nbsp;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
ipad2 &lt;br /&gt;
•    Jaringan: GSM  850, 900, 1800, 1900; UMTS atau WCDMA 850, 900, 1900, 2100&lt;br /&gt;
•    Data: Edge, UMTS,  (HSDPA 14.4 Mbit/s),  HSUPA 2.0 Mbit/s&lt;br /&gt;
•    Dimensi: 241.2 x 185.7 x 8.8 mm, Bobot: 613 gram&lt;br /&gt;
•    Display: layar sentuh LCD kapasitif, 1024 x 768 pixels, 9.70 inchi, Multitouch, Light sensor&lt;br /&gt;
•    Sistem Operasi: iOS (4.x)&lt;br /&gt;
•    Prosesor : 1 GHz Dual-core A5&lt;br /&gt;
•    Kamera utama: 0.7 MP (960 x 720 px)&lt;br /&gt;
•    Kamera sekunder: setarai VGA&lt;br /&gt;
•    Video: 1280x720 (720p HD) (30 fps)&lt;br /&gt;
•    Browser: HTML&lt;br /&gt;
•    GPS: AGPS&lt;br /&gt;
•    Konektivitas: Wi-Fi 802.11a, 802.11b, 802.11g, 802.11n, Bluetooth v2.1, HDMI, TV out&lt;br /&gt;
•    Fitur lain: Accelerometer, Gyroscope, Compass, Player MP3, AAC, M4A  (Apple lossless), Player MPEG4, H.264, Motion JPG, MOV, Youtube player,  Document viewer (Office 2007, Office 2003, PDF&lt;br /&gt;
harga 5.6 juta rupiah&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Huawei 57&lt;br /&gt;
&lt;br /&gt;
# Sistem Operasi:  Android 2.1 upgradeable to v2.2 (Froyo)&lt;br /&gt;
# Dimensi: 209x108x15.5mm Bobot: 500g&lt;br /&gt;
# Display: 7” 800×480 (WVGA)&lt;br /&gt;
# Prosesor: 1 GHz Qualcomm Snapdragon QSD 8250&lt;br /&gt;
# Kamera Utama: 2 Mega Pixel&lt;br /&gt;
# Kamera Sekunder: 0.3 Mega Pixel&lt;br /&gt;
# Konektivitas: WiFi 802.11 (/b/g/n), Bluetooth v2.1 + EDR, Micro USB Data 2.0,&lt;br /&gt;
# Video: H.264, MPEG4 (720p HD)&lt;br /&gt;
# Audio: MP3, AMR, AAC&lt;br /&gt;
# Aplikasi utama: SMS/MMS, E-mail Client, Contact Management, HD Video  &amp;amp; Audio Player, Web browser &amp;amp; Appropriate Plug Ins, RSS Feed,  Widget Engine and Management, Kalender, Photo Album, Remote Upgrade and  Management, Document togo Office reader&lt;br /&gt;
# Fitur menarik lainnya: Mendukung 3D Games,  Web 2.0, UI Emotion  Widget, Dual Hi-Fi speaker, MIC, jack audio 3.5 mm, Dock jack, Sensor  Gravitasi, Optical Track Pad, Auto Light Sensor,&lt;br /&gt;
# Konektivitas: WiFi 802.11 (a/b/g/n), Bluetooth v2.1, micro USB&lt;br /&gt;
# Memori internal: 8 GB, slot kartu micro SD up to 16 GB&lt;br /&gt;
# Battery: Li-ION 3.7V 2200 mAh&lt;br /&gt;
#harga 3 jutaan (di hongkong dan australia)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/3948096728409707412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/09/samsung-galaxy-tab-101.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/3948096728409707412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/3948096728409707412'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/09/samsung-galaxy-tab-101.html' title='Samsung Galaxy Tab 10.1'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBDI_WnipixnU8GffJ3fQIqwuxo3qhLakSWy2_TkW_osmEDKV0uFBpYOBQFPBnO2PUtTQvgpgDRw2AvLq61-ePVngvt8oZh45YGXLlcT2rUnrxlyyqIg4kxFAYlaYaysX5ElEVXY0ufDs/s72-c/samsung-galaxy-tab-101.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-5144495549412572198</id><published>2011-06-29T23:12:00.002+07:00</published><updated>2011-07-13T19:14:04.690+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><category scheme="http://www.blogger.com/atom/ns#" term="Belajar Struktur Data"/><category scheme="http://www.blogger.com/atom/ns#" term="Laporan Praktikum Algoritma dan Pemrograman"/><title type='text'>Class Inheritance</title><content type='html'>Using the &lt;strong class=&quot;bbc&quot;&gt;foo&lt;/strong&gt; class from the previous tutorial as a base class, we are going to introduce a new class called &lt;strong class=&quot;bbc&quot;&gt;fooed&lt;/strong&gt; that inherits from &lt;strong class=&quot;bbc&quot;&gt;foo&lt;/strong&gt;. Here are the two classes without any methods.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;class foo {
    public:
        int    m_counter;
        float  m_value;
        char * m_buffer;
};

class fooed : public foo {
    public:
        double m_double;
};&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;As in the previous tutorial, both the class &lt;strong class=&quot;bbc&quot;&gt;fooed&lt;/strong&gt; and the structure fooed have exactly the same size of twenty bytes (a double field being eight bytes in length).

&amp;nbsp;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/5144495549412572198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/class-inheritance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/5144495549412572198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/5144495549412572198'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/class-inheritance.html' title='Class Inheritance'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-2929924137349080517</id><published>2011-06-28T21:06:00.002+07:00</published><updated>2011-07-13T19:09:25.366+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><category scheme="http://www.blogger.com/atom/ns#" term="Laporan Praktikum Algoritma dan Pemrograman"/><title type='text'>OOP Recursive Decent Parsing III</title><content type='html'>we are going to use the Production class as the base class for each one  of our productions. Polymorphism with the Production class will come in  shortly. Now the most basic production we have here is number. It’s a  terminal production and can be implemented quite easily.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;pre&gt;/**
* a class to parse a number from the input stream
*/
class Number : public Production {
private:
 double value;
public:
 Number(std::istream&amp;amp; in);
 ///Override
 double getValue();
};&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;/**
* Number
*/

Number::Number(std::istream&amp;amp; in) {
 ignoreSpace(in); //remove all preceding space
 in&amp;gt;&amp;gt;value;
 if(!in) {
  throw ParseError();
  return;
 }
 ignoreSpace(in); //remove all following space
}

///Override
double Number::getValue() {
 return value;
}
&amp;nbsp;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/2929924137349080517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/oop-recursive-decent-parsing-iii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2929924137349080517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2929924137349080517'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/oop-recursive-decent-parsing-iii.html' title='OOP Recursive Decent Parsing III'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-7502160263838043533</id><published>2011-06-26T19:05:00.001+07:00</published><updated>2011-07-13T19:09:45.977+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><title type='text'>OOP Recursive Decent Parsing II</title><content type='html'>&lt;pre&gt;#include &amp;lt;istream&amp;gt;
#include &amp;lt;deque&amp;gt;
#include &amp;lt;locale&amp;gt;

#include &quot;Parser.h&quot;

/**
* static functions
*/
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
//protptype the functions so compiler wont complain
static void ignoreSpace(std::istream&amp;amp; in);
static char getChar(std::istream&amp;amp; in);

/**
* $1 - an input stream
* pre - none
* post - all spaces up to the next non space char are removed
*/
static void ignoreSpace(std::istream&amp;amp; in) {
 while(isspace(in.peek())) {
  in.get();
 }
}

/**
* $1 - an input stream
* pre - none
* post - all  preceding and following space is removed. 1 non-space char is removed
*/
static char getChar(std::istream&amp;amp; in) {
 ignoreSpace(in); //remove all preceding space
 char ret = in.get();
 ignoreSpace(in); //remove all following space
 return ret;
}

/**
* Production
*/

//dose nothing, if we don&#39;t need to override it we don&#39;t want to
Production::~Production() {}

///ParseError

const char* ParseError::what() const throw() {
 return &quot;a parsing error occured&quot;;
}
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/7502160263838043533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/oop-recursive-decent-parsing-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/7502160263838043533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/7502160263838043533'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/oop-recursive-decent-parsing-ii.html' title='OOP Recursive Decent Parsing II'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-5267874028793610291</id><published>2011-06-20T22:03:00.002+07:00</published><updated>2011-07-13T19:05:24.011+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><category scheme="http://www.blogger.com/atom/ns#" term="Laporan Praktikum Algoritma dan Pemrograman"/><title type='text'>OOP Recursive Decent Parsing I</title><content type='html'>First off we need to define what our parser is going to do; we need to a  construct a set of terminals and non-terminals to work with, in other  words a “grammar.” Let’s look at the following grammar.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;expr -&amp;gt; term ‘+’ term&lt;br /&gt;
expr -&amp;gt; term ‘-‘ term&lt;br /&gt;
exor -&amp;gt; term&lt;br /&gt;
term -&amp;gt; unary ‘*’ unary&lt;br /&gt;
term -&amp;gt; unary ‘/’ unary&lt;br /&gt;
term -&amp;gt; unary&lt;br /&gt;
unary -&amp;gt; ‘-‘ factor&lt;br /&gt;
unary -&amp;gt; ‘+’ factor&lt;br /&gt;
unary -&amp;gt; factor&lt;br /&gt;
factor -&amp;gt; &#39;(&#39; expr &#39;)&#39;&lt;br /&gt;
factor -&amp;gt; number&lt;br /&gt;
&lt;br /&gt;
In this case a factor is either a number or an expression  enclosed by parenthesis, a factor could be a symbol or string literal,  as well. For the purpose of this tutorial we will just use numbers. Also  we are using a fairly limited set of operators&lt;br /&gt;
&lt;br /&gt;
Let’s get down to business. First we want to set things up a bit; we  want to predefine our classes and create some building blocks. &lt;br /&gt;
&lt;pre&gt;#ifndef PARSER_H_INCLUDED
#define PARSER_H_INCLUDED

#include &amp;lt;istream&amp;gt;
#include &amp;lt;deque&amp;gt;
#include &amp;lt;exception&amp;gt;

//pre-declare are classes so they can be used in a non-discriminate order
class Production;
class Expr;
class Term;
class Unary;
class Number;
class Factor;
class ParseError;

/**
* the base class for all of our productions
*/
class Production {
public:
 virtual ~Production(); //dose nothing, if we don&#39;t need to override it we don&#39;t want to
 virtual double getValue()=0; //pure virtual, all children MUST implmnet this function
};

/**
* a simple class to handle parsing errors
*/
class ParseError : public std::exception {
 const char* what() const throw();
};
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/5267874028793610291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/oop-recursive-decent-parsing-i.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/5267874028793610291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/5267874028793610291'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/oop-recursive-decent-parsing-i.html' title='OOP Recursive Decent Parsing I'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-2155157847687326414</id><published>2011-06-15T07:29:00.000+07:00</published><updated>2011-07-13T18:39:27.460+07:00</updated><title type='text'>c++ Combination and Permutation</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 0in 0in 1pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;#include &amp;lt;iostream.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;#include &amp;lt;conio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;long int fak (long int x);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;void main()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;int n,r, Prts,pilihan,p;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;char ulang;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;clrscr();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;TUTIK LESTARI&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;PERHITUNGAN KOMBINASI DAN PERMUTASI&quot;&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;1. KOMBINASI&quot;&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;2. PERMUTASI&quot;&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;3. EXIT&quot;&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;Pilihan Anda : &quot;;cin&amp;gt;&amp;gt;pilihan;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;switch (pilihan)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;case 1 :&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot; Program Menghitung Kombinasi(nCr)&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot; Masukkan Nilai n : &quot;; cin&amp;gt;&amp;gt;n;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot; Masukkan Nilai r : &quot;; cin&amp;gt;&amp;gt;r;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;if (n&amp;gt;r){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;Prts = fak(n)/(fak(n-r)*fak (r));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;printf(&quot; Kombinasinya adalah: %d&quot;,Prts);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;else if (n&amp;lt;r){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;data tak valid&quot;;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;break;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;case 2 :&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot; Program Menghitung Permutasi(nPr)&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot; Masukkan Nilai n : &quot;; cin&amp;gt;&amp;gt;n;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot; Masukkan Nilai r : &quot;; cin&amp;gt;&amp;gt;r;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;if (n&amp;gt;r){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;Prts = fak (n)/fak(n-r);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;printf(&quot; Permutasinya adalah: %d&quot;,Prts);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;else if (n&amp;lt;r){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;data tak valid&quot;;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;endl ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;break;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;case 3 :&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;Exitâ&lt;/span&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;�&lt;/span&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;¦&quot;&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;break;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;default:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;Menu tidak tersedia&quot;&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;break;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;cout&amp;lt;&amp;lt;&quot;Kembali ke Menu Utama (y/n)?&quot;;cin&amp;gt;&amp;gt;ulang;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;}while(ulang == &#39;y&#39;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;getch();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;long int fak (long int n)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;int f;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;if (n&amp;lt;=1)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;f=1;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;else&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;f=n*fak(n-1);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;return (f);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; font-family: Arial,Helvetica,sans-serif; line-height: 150%; margin-bottom: 0.0001pt; padding: 1pt 0in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/2155157847687326414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/01/c-combination-and-permutation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2155157847687326414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2155157847687326414'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/01/c-combination-and-permutation.html' title='c++ Combination and Permutation'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-2615597917755509098</id><published>2011-06-13T18:12:00.004+07:00</published><updated>2011-07-13T18:24:35.585+07:00</updated><title type='text'>Sorting Data with Bubble Sort methods</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Arial,Helvetica,sans-serif; line-height: normal; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN&quot; style=&quot;font-size: small;&quot;&gt;Ordering is one of the basic process that is often discussed in algorithms and data structures. And one of the simplest classical algorithms in terms of sorting (sorting) is the Bubble Sort algorithm. In spite of some deficiencies which make these algorithms are not widely used in the sorting process in the application, but not be denied, this algorithm can be described as the pioneer of the sorting algorithm. &lt;/span&gt;&lt;span lang=&quot;en&quot; style=&quot;font-size: small;&quot;&gt;Within the courses algorithms and Data structures&lt;/span&gt;&lt;span lang=&quot;EN&quot; style=&quot;font-size: small;&quot;&gt; in various colleges can also be included in the sorting algorithm using the Bubble concept as one of the subject. &lt;/span&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;conio&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; int data[10];&lt;br /&gt;
&amp;nbsp;&amp;nbsp; int i, j, tmp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;Mengurutkan Data&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;Dengan Metode Bubble Sort&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; for(i=0; i&amp;lt;10; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;Masukkan bilangan ke   &quot;&amp;lt;&amp;lt;(i+1)&amp;lt;&amp;lt;&quot; : &quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt;data[i];&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; clrscr();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;Data sebelum diurutkan : &quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; for(i=0; i&amp;lt;10; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;data[i]&amp;lt;&amp;lt;&quot; &quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;endl;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; for(i=0; i&amp;lt;9; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for(j=i+1; j&amp;lt;10; j++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(data[i]&amp;gt;data[j])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tmp =   data[i];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data[i] =   data[j];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data[j] =   tmp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;Data setelah diurutkan : &quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; for(i=0; i&amp;lt;10; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;data[i]&amp;lt;&amp;lt;&quot; &quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; getch();&lt;br /&gt;
}&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Arial,Helvetica,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/2615597917755509098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/sorting-data-with-bubble-sort-methods.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2615597917755509098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2615597917755509098'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/sorting-data-with-bubble-sort-methods.html' title='Sorting Data with Bubble Sort methods'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-274258571680141123</id><published>2011-06-06T20:25:00.002+07:00</published><updated>2011-07-13T18:27:57.592+07:00</updated><title type='text'>Sorting By Insertion</title><content type='html'>&lt;div class=&quot;mttextarea&quot; dir=&quot;ltr&quot; id=&quot;TranslationOutput&quot; style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;div lang=&quot;en&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Problem&lt;/span&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Given the set of n numbers randomly sort them by the method of insertion.&lt;/span&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;input and output&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span lang=&quot;en&quot; style=&quot;font-size: small;&quot;&gt;N = an integer array of array [1 ...&lt;/span&gt;&lt;span lang=&quot;en&quot; style=&quot;font-size: small;&quot;&gt;100] of&lt;/span&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Integer&lt;/span&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;K, j, temp = integer&lt;/span&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Algorithm&lt;/span&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Sort numbers by way of&amp;nbsp; insertion sort&lt;/span&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Description&lt;/span&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;For k&lt;/span&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;ß&lt;/span&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt; 2 to n do&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Temp := data [k];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;J: - k-1;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;While&amp;nbsp; (temp &amp;lt;= data [j] and (j&amp;gt; 1) do data [j+1] : = data [j];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;J:= j-1;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;End while&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;If (temp &amp;gt; = data [j] then data [j+1]:= temp&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Else&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;nbsp;data [j+1]:= data [j];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;data [j] := temp&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;end if&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;end for&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Coding&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Class sorting {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Friend istream &amp;amp; operator &amp;gt;&amp;gt; (istream &amp;amp;&amp;nbsp; in, sorting &amp;amp; a);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Friend ostream &amp;amp; operator &amp;lt;&amp;lt; (ostream &amp;amp; our, sorting &amp;amp; a);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Public :&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Void baca_data();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Void cetak_data();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Void buule_data();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Void insertion_sort();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Void selection_sort();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Private:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Void minimum (int &amp;amp; , int &amp;amp; );&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Void tukar (int&amp;amp;, int&amp;amp;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Int data [10], n;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Istream&amp;amp; operator &amp;gt;&amp;gt; (istream&amp;amp; in, sorting&amp;amp; a){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cout &amp;lt;&amp;lt; “banyak data&amp;nbsp; : ” ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;In &amp;gt;&amp;gt; a.n;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;For cin I =0 ; I &amp;lt; a.n ;i++){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cout &amp;lt;&amp;lt; “data ke – “ &amp;lt;&amp;lt; i+ 1&amp;lt;&amp;lt;” : “ ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;In &amp;gt;&amp;gt; a. data [i];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Return in;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Ostream&amp;amp; operator &amp;lt;&amp;lt; (ostream&amp;amp; out, sorting&amp;amp; a ){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;For (int I ; 0 ; I &amp;lt; a. n ; i++)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Out &amp;lt;&amp;lt; a.data [i] &amp;lt;&amp;lt;”&amp;nbsp; “ ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Out &amp;lt;&amp;lt; “ in “ ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Return out ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Void sorting :: tukar (int&amp;amp; a , int&amp;amp; b)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Int temp ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;A= b;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;B= temp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Void sorting :: insertion_sort()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;int I,j, temp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;cout &amp;lt;&amp;lt; “ data pertama sudah ada di tangan kiri yaitu :” &amp;lt;&amp;lt; data [0] &amp;lt;&amp;lt; ‘ \ n’;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;for&amp;nbsp; | j = I&amp;nbsp; ; j &amp;lt; n ; j ++)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Temp = data [j];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cout &amp;lt;&amp;lt; \\ n data ke – “ &amp;lt;&amp;lt; j + 1 &amp;lt;&amp;lt; “yaitu “ &amp;lt;&amp;lt; data [j] &amp;lt;&amp;lt; “ diambil dari meja \n;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cout &amp;lt;&amp;lt; “ dilakukan penggeseran elemen ;\ n;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;For ( I = j -1 ; ( 1 &amp;gt; = o) &amp;amp;&amp;amp; (data [i] &amp;gt; temp ) ; i--)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cout &amp;lt;&amp;lt; “ data pada posisi ke – [ “ &amp;lt;&amp;lt; I + 1 &amp;lt;&amp;lt; “]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Di geser ke posisi [ “ &amp;lt;&amp;lt; I + 2 &amp;lt;&amp;lt; “ ] \ n;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Data [ i+1 ] = data [i];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cout&amp;nbsp; &amp;lt;&amp;lt; “ data baru masuk pada posisi ke – [ “ &amp;lt;&amp;lt; I “ ] \ n” ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Data [ i+1] = temp ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cout (int k =0 ; k &amp;lt; = j ; k ++)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cout &amp;lt;&amp;lt; data [k] &amp;lt;&amp;lt;” “;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Getch ();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Void main (){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Sorting angka ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cin &amp;gt;&amp;gt;. Angka ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cin &amp;gt;&amp;gt; angka&amp;nbsp; ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Anka. Insertion-sort ();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cout &amp;lt;&amp;lt; “\ n hasil (akhir adalah : \ n” ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Cout &amp;lt;&amp;lt; angka ;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border-color: -moz-use-text-color -moz-use-text-color windowtext; border-style: none none solid; border-width: medium medium 0.5pt; padding: 1pt 0in;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/274258571680141123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/sorting-by-insertion.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/274258571680141123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/274258571680141123'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/06/sorting-by-insertion.html' title='Sorting By Insertion'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-2312881562815343910</id><published>2011-05-25T18:33:00.001+07:00</published><updated>2011-07-13T18:12:42.192+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Jeliot 3"/><title type='text'>Calculate Sequebce by Using Iterative Function</title><content type='html'>Jeliot Program to calculate the Sequence by using the Iterative Function&lt;br /&gt;
import jeliot.io.*;&lt;br /&gt;
&lt;br /&gt;
public class hitung {&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void input(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;tentukan nilai n:&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; n=Input.readInt();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void proses(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jumlah=0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; total=0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rumus=-1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int j=1; j&amp;lt;=n; j++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rumus=(rumus*(-1));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; total=rumus/j;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jumlah+=total;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(j==1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(+total);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(j&amp;gt;1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(+total);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;hasil penjumlahan deret = &quot;+jumlah);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
private int n;&lt;br /&gt;
private float rumus,jumlah,total;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hitung h=new hitung();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.input();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.proses();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/2312881562815343910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/05/calculate-sequebce-by-using-iterative.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2312881562815343910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2312881562815343910'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/05/calculate-sequebce-by-using-iterative.html' title='Calculate Sequebce by Using Iterative Function'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-2860071708277201922</id><published>2011-05-23T18:23:00.000+07:00</published><updated>2011-05-23T18:24:43.296+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><title type='text'>A Comparison of Sorting Algorithms</title><content type='html'>Recently, I have translated a variety of sorting routines into   Visual Basic and compared their performance...&amp;nbsp;&amp;nbsp;I hope you will find the   &lt;a class=&quot;iAs&quot; href=&quot;http://www.softpanorama.org/Algorithms/sorting.shtml#&quot; style=&quot;background-color: transparent !important; background-image: none; border-bottom: 0.07em solid darkgreen; color: darkgreen !important; font-size: 100% !important; font-weight: normal !important; padding-bottom: 1px !important; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline !important;&quot; target=&quot;_blank&quot;&gt;code&lt;/a&gt;                   for                   these                   sorts                   useful                   and                   interesting.                   &lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;img src=&quot;http://www.devx.com/assets/articlefigs/8268.gif&quot; /&gt;                   &amp;nbsp;                  &lt;br clear=&quot;all&quot; /&gt;&lt;br /&gt;
What makes a good sorting algorithm?&amp;nbsp; Speed is                   probably                   the                   top                   consideration,                   but                   other                   factors                   of                   interest                   include                   versatility                   in                   handling                   various                  &lt;a class=&quot;iAs&quot; href=&quot;http://www.softpanorama.org/Algorithms/sorting.shtml#&quot; style=&quot;background-color: transparent !important; background-image: none; border-bottom: 0.07em solid darkgreen; color: darkgreen !important; font-size: 100% !important; font-weight: normal !important; padding-bottom: 1px !important; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline !important;&quot; target=&quot;_blank&quot;&gt;data&lt;/a&gt;   types, consistency of performance,                   memory                   requirements,                   length                   and                   complexity                   of                   code,                   and                   the                   property                   of                   stability                   (preserving                   the                   original                   order                   of                   records                   that                   have                   equal                   keys).&amp;nbsp;                   As                   you                   may                   guess,                   no                   single                   sort                   is                   the                   winner                   in                   all                   categories                   simultaneously                   (Table                   2).&lt;br /&gt;
&lt;img src=&quot;http://www.devx.com/assets/articlefigs/8269.gif&quot; /&gt;                   &amp;nbsp;                  &lt;br clear=&quot;all&quot; /&gt;Let&#39;s start with speed, which breaks down into                   &quot;order&quot;                   and                   &quot;overhead&quot;.&amp;nbsp;&amp;nbsp;                   When                   we                   talk                   about                   the                   order                   of a                   sort,                   we                   mean                   the                   relationship                   between                   the                   number                   of                   keys                   to                   be                   sorted                   and                   the                   time                   required.&amp;nbsp;                   The                   best                   case                   is                   O(N);                   time                   is                   linearly                   proportional                   to                   the                   number                   of                   items.&amp;nbsp;                   We                   can&#39;t                   do                   this                   with                   any                   sort                   that                   works                   by                   comparing                   keys;                   the                   best                   such                   sorts                   can                   do                   is                   O(N                   log                   N),                   but                   we                   can                   do                   it                   with                   a                   RadixSort,                   which                   doesn&#39;t                   use                   comparisons.&amp;nbsp;                   Many                   simple                   sorts                   (Bubble,                   Insertion,                   Selection)                   have                   O(N^2)                   behavior,                   and                   should                   never                   be                   used                   for                   sorting                   long                   lists.&amp;nbsp;                   But                   what                   about                   short                   lists?&amp;nbsp;                   The                   other                   part                   of                   the                   speed                   equation                   is                   overhead                   resulting                   from                   complex                   code,                   and                   the                   sorts                   that                   are                   good                   for                   long                   lists                   tend                   to                   have                   more                   of                   it.&amp;nbsp;                   For                   short                   lists                   of 5                   to                   50                   keys                   or                   for                   long                   lists                   that                   are                   almost                   sorted,                   Insertion-Sort                   is                   extremely                   efficient                   and                   can                   be                   faster                   than                   finishing                   the                   same                   job                   with                   QuickSort                   or a                   RadixSort.&amp;nbsp;                   Many                   of                   the                   routines                   in                   my                   collection                   are                   &quot;hybrids&quot;,                   with                   a                   version                   of                   InsertionSort                   finishing                   up                   after                   a                   fast                   algorithm                   has                   done                   most                   of                   the                   job.The                   third                   aspect                   of                   speed                   is                   consistency.&amp;nbsp;                   Some                   sorts                   always                   take                   the                   same                   amount                   of                   time                   ,                   but                   many                   have                   &quot;best                   case&quot;                   and                   &quot;worst                   case&quot;                  &lt;a class=&quot;iAs&quot; href=&quot;http://www.softpanorama.org/Algorithms/sorting.shtml#&quot; style=&quot;background-color: transparent !important; background-image: none; border-bottom: 0.07em solid darkgreen; color: darkgreen !important; font-size: 100% !important; font-weight: normal !important; padding-bottom: 1px !important; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline !important;&quot; target=&quot;_blank&quot;&gt;performance&lt;/a&gt;                   for                   particular                   input                   orders                   of                   keys.&amp;nbsp;                   A                   famous                   example                   is                   QuickSort,                   generally                   the                   fastest                   of                   the                   O(N                   log                   N)                   sorts,                   but                   it                   always                   has                   an                   O(N^2)                   worst                   case.&amp;nbsp;                   It                   can                   be                   tweaked                   to                   make                   this                   worst                   case                   very                   unlikely                   to                   occur,                   but                   other                   O(N                   log                   N)                   sorts                   like                   HeapSort                   and                   MergeSort                   remain                   O(N                   log                   N)                   in                   their                   worst                   cases.&amp;nbsp;                   QuickSort                   will                   almost                   always                   beat                   them,                   but                   occasionally                   they                   will                   leave                   it                   in                   the                   dust.&amp;nbsp;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/2860071708277201922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/05/comparison-of-sorting-algorithms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2860071708277201922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2860071708277201922'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/05/comparison-of-sorting-algorithms.html' title='A Comparison of Sorting Algorithms'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-802314180404314865</id><published>2011-05-18T18:20:00.001+07:00</published><updated>2011-05-23T18:21:35.212+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><title type='text'>Typical data sequences for testing sorting algorithms</title><content type='html'>&lt;div align=&quot;left&quot;&gt;There is not &quot;best sorting algorithm&quot; for all data. Various  algorithms have their own strength and weaknesses. For example some &quot;sense&quot;  already sorted or &quot;almost sorted&quot; data sequences and perform faster on such  sets.&amp;nbsp; In this sense Knuth math analysis is insufficient althouth &quot;worst  time&quot; estimates are useful. &lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;As for input data it is useful to distinguish between the  following broad categories that all should be used in testing (random number  sorting is a very artificial test and as such the estimate it provides does  not have much practical value, unless we know that other cases behave similarly  or better):&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;ol&gt;&lt;li&gt;   &lt;div align=&quot;left&quot;&gt;Completely randomly reshuffled array (this is the only   test that naive people use in evaluating sorting algorithms) . &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;   &lt;div align=&quot;left&quot;&gt;Already sorted array (you   need to see how horrible Quicksort is on this case and how good shellsort   is ;-). This is actually a pretty important case as  &lt;span style=&quot;color: red;&quot;&gt;&lt;i&gt;&lt;b&gt;often sorting is actually resorting of previously   sorted data done after minimal modifications of the data set.&amp;nbsp;   There are three imortant case of already sorted array&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;    &lt;div align=&quot;left&quot;&gt;Array of distinct elements sorted in &quot;right&quot;    direction for which no any reordering is required (triangular    array). &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;    &lt;div align=&quot;left&quot;&gt;Already sorted array consisting of small number    of identical elements (stairs). The worst case is retangular    array in when single element is present (all values are    identical).&amp;nbsp; &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;    &lt;div align=&quot;left&quot;&gt;Already sorted in reverse order array (many algorithms,   such as insertion sort work slow on such an array)&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;   &lt;div align=&quot;left&quot;&gt;Array that consisted of merged already sorted   arrays(Chainsaw array). Arrays can be sorted&lt;/div&gt;&lt;ol&gt;&lt;li&gt;    &lt;div align=&quot;left&quot;&gt;in right direction &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;    &lt;div align=&quot;left&quot;&gt;in opposite direction of have arrays &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;    &lt;div align=&quot;left&quot;&gt;both sorted in right and opposite direction (one    case is &quot;symmetrical chainsaw&quot;).&amp;nbsp; &lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;   &lt;div align=&quot;left&quot;&gt;Array consisting of small number of identical elements   (sometimes called&amp;nbsp; or &quot;few unique&quot; case). If number of distint   elements is large this is the case similar to chainsaw but without   advantage of preordeing. So it can ge generated by &quot;inflicting&quot;   certain number of permuations on chainsaw array. Worst case is when   there is just two values of elements in the array (binary array).   Quicksort is horrible on such data. Many other algorithms work slow   on such an array.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;   &lt;div align=&quot;left&quot;&gt;Already sorted in right direction array with N permutations (with N from   0.1 to 10% of the size). Insrtion soft does well on such arrays.   Shellsort also is quick. Quick sort do not adapt well to nearly   sorted data. &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;   &lt;div align=&quot;left&quot;&gt;Already sorted array in reverse order array with N permutations&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;   &lt;div align=&quot;left&quot;&gt;Large data sets with normal distribution of keys.  &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;   &lt;div align=&quot;left&quot;&gt;Pseudorandom data (daily values of S&amp;amp;P500 or other index   for a decade or two might be a good test set here&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/802314180404314865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/05/typical-data-sequences-for-testing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/802314180404314865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/802314180404314865'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/05/typical-data-sequences-for-testing.html' title='Typical data sequences for testing sorting algorithms'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-6130499541674590657</id><published>2011-05-15T18:19:00.002+07:00</published><updated>2011-05-23T18:20:37.886+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><title type='text'>Quicksort Algorithm</title><content type='html'>Having struggled to follow the recursive calls to quicksort and  partition I have modified the code to include the calls to both  functions, displaying the order in which the array is in at each stage.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;table class=&quot;snippet&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;rownum&quot;&gt;&lt;tt&gt;1&lt;br /&gt;
2&lt;br /&gt;
3&lt;br /&gt;
4&lt;br /&gt;
5&lt;br /&gt;
6&lt;br /&gt;
7&lt;br /&gt;
8&lt;br /&gt;
9&lt;br /&gt;
10&lt;br /&gt;
11&lt;br /&gt;
12&lt;br /&gt;
13&lt;br /&gt;
14&lt;br /&gt;
15&lt;br /&gt;
16&lt;br /&gt;
17&lt;br /&gt;
18&lt;br /&gt;
19&lt;br /&gt;
20&lt;br /&gt;
21&lt;br /&gt;
22&lt;br /&gt;
23&lt;br /&gt;
24&lt;br /&gt;
25&lt;br /&gt;
26&lt;br /&gt;
27&lt;br /&gt;
28&lt;br /&gt;
29&lt;br /&gt;
30&lt;br /&gt;
31&lt;br /&gt;
32&lt;br /&gt;
33&lt;br /&gt;
34&lt;br /&gt;
35&lt;br /&gt;
36&lt;br /&gt;
37&lt;br /&gt;
38&lt;br /&gt;
39&lt;br /&gt;
40&lt;br /&gt;
41&lt;br /&gt;
42&lt;br /&gt;
43&lt;br /&gt;
44&lt;br /&gt;
45&lt;br /&gt;
46&lt;br /&gt;
47&lt;br /&gt;
48&lt;br /&gt;
49&lt;br /&gt;
50&lt;br /&gt;
51&lt;br /&gt;
52&lt;br /&gt;
53&lt;br /&gt;
54&lt;br /&gt;
55&lt;br /&gt;
56&lt;br /&gt;
57&lt;br /&gt;
58&lt;br /&gt;
59&lt;br /&gt;
60&lt;br /&gt;
61&lt;br /&gt;
62&lt;br /&gt;
63&lt;br /&gt;
64&lt;br /&gt;
65&lt;br /&gt;
66&lt;br /&gt;
67&lt;br /&gt;
68&lt;br /&gt;
69&lt;br /&gt;
70&lt;br /&gt;
71&lt;br /&gt;
72&lt;br /&gt;
73&lt;br /&gt;
74&lt;br /&gt;
75&lt;br /&gt;
76&lt;br /&gt;
77&lt;br /&gt;
78&lt;br /&gt;
79&lt;br /&gt;
80&lt;br /&gt;
81&lt;br /&gt;
82&lt;br /&gt;
83&lt;br /&gt;
84&lt;br /&gt;
85&lt;br /&gt;
86&lt;br /&gt;
87&lt;br /&gt;
88&lt;br /&gt;
89&lt;br /&gt;
90&lt;br /&gt;
91&lt;br /&gt;
92&lt;br /&gt;
93&lt;br /&gt;
94&lt;br /&gt;
95&lt;br /&gt;
96&lt;br /&gt;
97&lt;br /&gt;
98&lt;br /&gt;
99&lt;br /&gt;
100&lt;br /&gt;
101&lt;br /&gt;
102&lt;br /&gt;
103&lt;br /&gt;
104&lt;br /&gt;
105&lt;/tt&gt;&lt;/td&gt; &lt;td class=&quot;source&quot;&gt;&lt;pre&gt;&lt;code&gt;&lt;dfn&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/dfn&gt;
&lt;dfn&gt;#include &amp;lt;string.h&amp;gt;&lt;/dfn&gt;
&lt;dfn&gt;#include &amp;lt;ctype.h&amp;gt;&lt;/dfn&gt;
&lt;dfn&gt;#include &amp;lt;iostream.h&amp;gt;&lt;/dfn&gt;
&lt;dfn&gt;#include &amp;lt;conio.h&amp;gt;&lt;/dfn&gt;

&lt;var&gt;void&lt;/var&gt; quicksort(&lt;var&gt;int&lt;/var&gt;*, &lt;var&gt;int&lt;/var&gt;, &lt;var&gt;int&lt;/var&gt;);
&lt;var&gt;int&lt;/var&gt; partition(&lt;var&gt;int&lt;/var&gt;*, &lt;var&gt;int&lt;/var&gt;, &lt;var&gt;int&lt;/var&gt;, &lt;var&gt;int&lt;/var&gt;);
&lt;var&gt;int&lt;/var&gt; median3(&lt;var&gt;int&lt;/var&gt;*,&lt;var&gt;int&lt;/var&gt;,&lt;var&gt;int&lt;/var&gt;);
&lt;var&gt;void&lt;/var&gt; swap(&lt;var&gt;int&lt;/var&gt; &amp;amp;, &lt;var&gt;int&lt;/var&gt; &amp;amp;);

&lt;var&gt;int&lt;/var&gt; main()
{
    &lt;var&gt;int&lt;/var&gt; myarray[7] = {10,40,20,12,30,5,15};
    quicksort(myarray, 0, 6);

    &lt;var&gt;for&lt;/var&gt; (&lt;var&gt;int&lt;/var&gt; i = 0; i &amp;lt; 7; i++)
    {
        cout &amp;lt;&amp;lt; myarray[i] &amp;lt;&amp;lt; endl;
    }
    getche();
    &lt;var&gt;return&lt;/var&gt; 0;
}

&lt;cite&gt;// Quicksort controller function, it partitions the different pieces of our array.&lt;/cite&gt;
&lt;var&gt;void&lt;/var&gt; quicksort(&lt;var&gt;int&lt;/var&gt; *arIntegers, &lt;var&gt;int&lt;/var&gt; left, &lt;var&gt;int&lt;/var&gt; right)
{
    cout &amp;lt;&amp;lt; &lt;kbd&gt;&quot;quicksort ([&quot;&lt;/kbd&gt; &amp;lt;&amp;lt; arIntegers[0] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
             &amp;lt;&amp;lt; arIntegers[1] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; arIntegers[2] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; arIntegers[3] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; arIntegers[4] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; arIntegers[5] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; arIntegers[6] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;],&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; right &amp;lt;&amp;lt; &lt;kbd&gt;&quot;)\n&quot;&lt;/kbd&gt;;
    &lt;var&gt;if&lt;/var&gt; (right &amp;gt; left)
    {
         &lt;var&gt;int&lt;/var&gt; pivotIndex = median3(arIntegers,left,right);
         &lt;var&gt;int&lt;/var&gt; pivotNewIndex = partition(arIntegers, left, right, pivotIndex);

         &lt;cite&gt;// Recursive call to quicksort to sort each half.&lt;/cite&gt;
         quicksort(arIntegers, left, pivotNewIndex-1);
         quicksort(arIntegers, pivotNewIndex+1, right);
    }
}

&lt;var&gt;int&lt;/var&gt; median3(&lt;var&gt;int&lt;/var&gt; *arIntegers,&lt;var&gt;int&lt;/var&gt; left,&lt;var&gt;int&lt;/var&gt; right)
{
  &lt;var&gt;int&lt;/var&gt; center = (left+right)/2;

   &lt;var&gt;if&lt;/var&gt;(arIntegers[center] &amp;lt; arIntegers[left])
    swap(arIntegers[left],arIntegers[center]);
   &lt;var&gt;if&lt;/var&gt;(arIntegers[right] &amp;lt; arIntegers[left])
    swap(arIntegers[left],arIntegers[right]);
   &lt;var&gt;if&lt;/var&gt;(arIntegers[right] &amp;lt; arIntegers[center])
    swap(arIntegers[center],arIntegers[right]);

   swap(arIntegers[center],arIntegers[right-1]);

   &lt;var&gt;return&lt;/var&gt; center;
}

&lt;cite&gt;// This function takes an array (or one half an array) and sorts it.&lt;/cite&gt;
&lt;cite&gt;// It then returns a new pivot index number back to quicksort.&lt;/cite&gt;

&lt;var&gt;int&lt;/var&gt; partition(&lt;var&gt;int&lt;/var&gt; *arIntegers, &lt;var&gt;int&lt;/var&gt; left, &lt;var&gt;int&lt;/var&gt; right, &lt;var&gt;int&lt;/var&gt; pivot)
{
     cout &amp;lt;&amp;lt; &lt;kbd&gt;&quot;partition (&quot;&lt;/kbd&gt; &amp;lt;&amp;lt; arIntegers[0] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
             &amp;lt;&amp;lt; arIntegers[1] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; arIntegers[2] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; arIntegers[3] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; arIntegers[4] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; arIntegers[5] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; arIntegers[6] &amp;lt;&amp;lt; &lt;kbd&gt;&quot;],&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; left &amp;lt;&amp;lt; &lt;kbd&gt;&quot;,&quot;&lt;/kbd&gt;
                          &amp;lt;&amp;lt; right &amp;lt;&amp;lt; &lt;kbd&gt;&quot;)\n&quot;&lt;/kbd&gt;;
     &lt;var&gt;int&lt;/var&gt; pivotValue = arIntegers[pivot];

     &lt;cite&gt;// Swap it out all the way to the end of the array&lt;/cite&gt;
     &lt;cite&gt;// So we know where it always is.&lt;/cite&gt;
     swap(arIntegers[pivot], arIntegers[right]);
     &lt;var&gt;int&lt;/var&gt; storeIndex = left;

     &lt;cite&gt;// Move through the array from start to finish comparing each to our&lt;/cite&gt;
     &lt;cite&gt;// pivot value (not index, the value that was located at the pivot index)&lt;/cite&gt;
     &lt;var&gt;for&lt;/var&gt; (&lt;var&gt;int&lt;/var&gt; i = left; i &amp;lt; right; i++)
     {
         &lt;var&gt;if&lt;/var&gt; (arIntegers[i] &amp;lt;= pivotValue)
         {
             swap(arIntegers[i], arIntegers[storeIndex]);
             storeIndex++;
         }
     }
     swap(arIntegers[storeIndex], arIntegers[right]);
     &lt;var&gt;return&lt;/var&gt; storeIndex;
}

&lt;cite&gt;// Simple swap function for our in place swapping.&lt;/cite&gt;
&lt;var&gt;void&lt;/var&gt; swap(&lt;var&gt;int&lt;/var&gt; &amp;amp;val1, &lt;var&gt;int&lt;/var&gt; &amp;amp;val2)
{
    &lt;var&gt;int&lt;/var&gt; temp = val1;
    val1 = val2;
    val2 = temp;
}&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/6130499541674590657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/05/quicksort-algorithm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/6130499541674590657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/6130499541674590657'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/05/quicksort-algorithm.html' title='Quicksort Algorithm'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-3434451137535629659</id><published>2011-05-02T21:24:00.000+07:00</published><updated>2011-05-02T21:24:10.900+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><category scheme="http://www.blogger.com/atom/ns#" term="Laporan Praktikum Algoritma dan Pemrograman"/><title type='text'>Vector</title><content type='html'>&lt;div class=&quot;C_doctop&quot; style=&quot;text-align: justify;&quot;&gt; &lt;h1&gt;&lt;/h1&gt;&lt;div class=&quot;right&quot;&gt;class template &lt;/div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class=&quot;docsubtop&quot; style=&quot;text-align: justify;&quot;&gt; &lt;div class=&quot;right&quot;&gt;&lt;code&gt;&amp;lt;vector&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Vector&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; Vectors are a kind of sequence container. As such, their elements are ordered following a strict linear sequence. Vector containers are implemented as dynamic arrays; Just as regular  arrays, vector containers have their elements stored in contiguous  storage locations, which means that their elements can be accessed not  only using iterators but also using offsets on regular pointers to  elements.&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;But unlike regular arrays, storage in vectors is handled automatically, allowing it to be expanded and contracted as needed.&lt;br /&gt;
&lt;br /&gt;
Vectors are good at:&lt;br /&gt;
&lt;/div&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;Accessing individual elements by their position index (constant time).&lt;/li&gt;
&lt;li&gt;Iterating over the elements in any order (linear time).&lt;/li&gt;
&lt;li&gt;Add and remove elements from its end (constant amortized time).&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;br /&gt;
Compared to arrays, they provide almost the same performance for these  tasks, plus they have the ability to be easily resized. Although, they  usually consume more memory than arrays when their capacity is handled  automatically (this is in order to accommodate extra storage space for  future growth).&lt;br /&gt;
&lt;br /&gt;
Compared to the other base standard sequence containers (&lt;a href=&quot;http://www.cplusplus.com/deque&quot;&gt;deque&lt;/a&gt;s and &lt;a href=&quot;http://www.cplusplus.com/list&quot;&gt;list&lt;/a&gt;s),  vectors are generally the most efficient in time for accessing elements   and to add or remove elements from the end of the sequence. For  operations that involve inserting or removing elements at positions  other than the end, they perform worse than &lt;a href=&quot;http://www.cplusplus.com/deque&quot;&gt;deque&lt;/a&gt;s and &lt;a href=&quot;http://www.cplusplus.com/list&quot;&gt;list&lt;/a&gt;s, and have less consistent iterators and references than &lt;a href=&quot;http://www.cplusplus.com/list&quot;&gt;list&lt;/a&gt;s.&lt;br /&gt;
&lt;br /&gt;
Internally, vectors -like all containers- have a &lt;a href=&quot;http://www.cplusplus.com/vector::size&quot;&gt;size&lt;/a&gt;, which represents the amount of elements contained in the vector. But vectors, also have a &lt;a href=&quot;http://www.cplusplus.com/vector::capacity&quot;&gt;capacity&lt;/a&gt;, which determines the amount of storage space they have allocated, and which can be either equal or greater than the actual &lt;a href=&quot;http://www.cplusplus.com/vector::size&quot;&gt;size&lt;/a&gt;.  The extra amount of storage allocated is not used, but is reserved for  the vector to be used in the case it grows. This way, the vector does  not have to reallocate storage on each occasion it grows, but only when  this extra space is exhausted and a new element is inserted (which  should only happen in logarithmic frequence in relation with its size).&lt;br /&gt;
&lt;br /&gt;
Reallocations may be a costly operation in terms of performance, since  they generally involve the entire storage space used by the vector to be  copied to a new location. Therefore, whenever large increases in size  are planned for a vector, it is recommended to explicitly indicate a &lt;a href=&quot;http://www.cplusplus.com/vector::capacity&quot;&gt;capacity&lt;/a&gt; for the vector using member function &lt;a href=&quot;http://www.cplusplus.com/vector::reserve&quot;&gt;vector::reserve&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In their implementation in the C++ Standard Template Library vectors take two template parameters:&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;auto&quot; style=&quot;text-align: justify;&quot;&gt;&lt;table class=&quot;snippet&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;rownum&quot;&gt;&lt;tt&gt;&amp;nbsp;&lt;/tt&gt;&lt;/td&gt; &lt;td class=&quot;source&quot;&gt;&lt;pre&gt;&lt;code&gt;&lt;var&gt;template&lt;/var&gt; &amp;lt; &lt;var&gt;class&lt;/var&gt; T, &lt;var&gt;class&lt;/var&gt; Allocator = allocator&amp;lt;T&amp;gt; &amp;gt; &lt;var&gt;class&lt;/var&gt; vector;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;br /&gt;
Where the template parameters have the following meanings:&lt;br /&gt;
&lt;/div&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;&lt;b&gt;&lt;tt&gt;T&lt;/tt&gt;:&lt;/b&gt; Type of the elements.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;tt&gt;Allocator&lt;/tt&gt;:&lt;/b&gt; Type of the allocator object used to define the storage allocation model. By default, the &lt;tt&gt;allocator&lt;/tt&gt; class template for type &lt;tt&gt;T&lt;/tt&gt; is used, which defines the simplest memory allocation model and is value-independent.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; In the reference for the vector member functions, these same names are assumed for the template parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;Member functions&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;/div&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/vector/&quot;&gt;&lt;b&gt;(constructor)&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Construct vector &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/%7Evector/&quot;&gt;&lt;b&gt;(destructor)&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Vector destructor &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/operator=/&quot;&gt;&lt;b&gt;operator=&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Copy vector content &lt;span class=&quot;typ&quot;&gt;(public member function )&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;br /&gt;
&lt;b&gt;Iterators&lt;/b&gt;:&lt;br /&gt;
&lt;/div&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/begin/&quot;&gt;&lt;b&gt;begin&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Return iterator to beginning &lt;span class=&quot;typ&quot;&gt;(public member type)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/end/&quot;&gt;&lt;b&gt;end&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Return iterator to end &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/rbegin/&quot;&gt;&lt;b&gt;rbegin&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Return reverse iterator to reverse beginning &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/rend/&quot;&gt;&lt;b&gt;rend&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Return reverse iterator to reverse end &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;br /&gt;
&lt;b&gt;Capacity&lt;/b&gt;:&lt;br /&gt;
&lt;/div&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/size/&quot;&gt;&lt;b&gt;size&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Return size &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/max_size/&quot;&gt;&lt;b&gt;max_size&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Return maximum size &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/resize/&quot;&gt;&lt;b&gt;resize&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Change size &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/capacity/&quot;&gt;&lt;b&gt;capacity&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Return size of allocated storage capacity &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/empty/&quot;&gt;&lt;b&gt;empty&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Test whether vector is empty &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/reserve/&quot;&gt;&lt;b&gt;reserve&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Request a change in capacity &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;br /&gt;
&lt;b&gt;Element access&lt;/b&gt;:&lt;br /&gt;
&lt;/div&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/operator%5B%5D/&quot;&gt;&lt;b&gt;operator[]&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Access element &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/at/&quot;&gt;&lt;b&gt;at&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Access element &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/front/&quot;&gt;&lt;b&gt;front&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Access first element &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/back/&quot;&gt;&lt;b&gt;back&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Access last element &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;br /&gt;
&lt;b&gt;Modifiers&lt;/b&gt;:&lt;br /&gt;
&lt;/div&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/assign/&quot;&gt;&lt;b&gt;assign&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Assign vector content &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/push_back/&quot;&gt;&lt;b&gt;push_back&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Add element at the end &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/pop_back/&quot;&gt;&lt;b&gt;pop_back&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Delete last element &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/insert/&quot;&gt;&lt;b&gt;insert&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Insert elements &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/erase/&quot;&gt;&lt;b&gt;erase&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Erase elements &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/swap/&quot;&gt;&lt;b&gt;swap&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Swap content &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/clear/&quot;&gt;&lt;b&gt;clear&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Clear content &lt;span class=&quot;typ&quot;&gt;(public member function)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;br /&gt;
&lt;b&gt;Allocator&lt;/b&gt;:&lt;br /&gt;
&lt;/div&gt;&lt;table class=&quot;C_docLink&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tit&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/reference/stl/vector/get_allocator/&quot;&gt;&lt;b&gt;get_allocator&lt;/b&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class=&quot;des&quot;&gt; Get allocator &lt;span class=&quot;typ&quot;&gt;(public member function )&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;br /&gt;
&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;Member types&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; of &lt;tt&gt;template &amp;lt;class T, class Allocator=allocator&amp;lt;T&amp;gt; &amp;gt; class vector;&lt;/tt&gt; &lt;br /&gt;
&lt;/div&gt;&lt;table class=&quot;boxed&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th&gt;member type&lt;/th&gt;&lt;th&gt;definition&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;reference&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;Allocator::reference&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;const_reference&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;Allocator::const_reference&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;iterator&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;i&gt;Random access iterator&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;const_iterator&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;i&gt;Constant random access iterator&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;size_type&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;i&gt;Unsigned integral type&lt;/i&gt; (usually same as &lt;a href=&quot;http://www.cplusplus.com/size_t&quot;&gt;size_t&lt;/a&gt;)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;difference_type&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;i&gt;Signed integral type&lt;/i&gt; (usually same as &lt;a href=&quot;http://www.cplusplus.com/ptrdiff_t&quot;&gt;ptrdiff_t&lt;/a&gt;)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;value_type&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;T&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;allocator_type&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;Allocator&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;pointer&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;Allocator::pointer&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;const_pointer&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;Allocator::const_pointer&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;reverse_iterator&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;reverse_iterator&amp;lt;iterator&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;const_reverse_iterator&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;reverse_iterator&amp;lt;const_iterator&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;br /&gt;
&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;Vector specialization: &lt;tt&gt;vector&amp;lt;bool&amp;gt;&lt;/tt&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; The vector class template has a special template specialization for the &lt;tt&gt;bool&lt;/tt&gt; type.&lt;br /&gt;
&lt;br /&gt;
This specialization is provided to optimize for space allocation: In  this template specialization, each element occupies only one bit (which  is eight times less than the smallest type in C++: &lt;tt&gt;char&lt;/tt&gt;).&lt;br /&gt;
&lt;br /&gt;
The references to elements of a &lt;tt&gt;bool&lt;/tt&gt; vector returned by the &lt;tt&gt;vector&lt;/tt&gt; members are not references to &lt;tt&gt;bool&lt;/tt&gt; objects, but a special member type which is a reference to a single bit, defined inside the &lt;tt&gt;vector&amp;lt;bool&amp;gt;&lt;/tt&gt; class specialization as:&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;table class=&quot;snippet&quot; style=&quot;margin-left: 0px; margin-right: 0px; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;rownum&quot;&gt;&lt;tt&gt;1&lt;br /&gt;
2&lt;br /&gt;
3&lt;br /&gt;
4&lt;br /&gt;
5&lt;br /&gt;
6&lt;br /&gt;
7&lt;br /&gt;
8&lt;br /&gt;
9&lt;br /&gt;
10&lt;/tt&gt;&lt;/td&gt; &lt;td class=&quot;source&quot;&gt;&lt;pre&gt;&lt;code&gt;&lt;var&gt;class&lt;/var&gt; vector&amp;lt;&lt;var&gt;bool&lt;/var&gt;&amp;gt;::reference {
  &lt;var&gt;friend&lt;/var&gt; &lt;var&gt;class&lt;/var&gt; vector;
  reference();                                 &lt;cite&gt;// no public constructor&lt;/cite&gt;
&lt;var&gt;public&lt;/var&gt;:
  ~reference();
  &lt;var&gt;operator&lt;/var&gt; &lt;var&gt;bool&lt;/var&gt; () &lt;var&gt;const&lt;/var&gt;;                      &lt;cite&gt;// convert to bool&lt;/cite&gt;
  reference&amp;amp; &lt;var&gt;operator&lt;/var&gt;= ( &lt;var&gt;const&lt;/var&gt; &lt;var&gt;bool&lt;/var&gt; x );       &lt;cite&gt;// assign from bool&lt;/cite&gt;
  reference&amp;amp; &lt;var&gt;operator&lt;/var&gt;= ( &lt;var&gt;const&lt;/var&gt; reference&amp;amp; x );  &lt;cite&gt;// assign from bit&lt;/cite&gt;
  &lt;var&gt;void&lt;/var&gt; flip();                                 &lt;cite&gt;// flip bit value.&lt;/cite&gt;
}&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/3434451137535629659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/05/vector.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/3434451137535629659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/3434451137535629659'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/05/vector.html' title='Vector'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-3640931796761455054</id><published>2011-04-24T19:51:00.001+07:00</published><updated>2011-04-24T19:51:00.322+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><title type='text'>Function to reverse an integer array</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;This function(ReverseArray is used to reverse an integer array. For example, if the&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;array is {1,2,3,4,5}, these functions will return an array like {5,4,3,2,1}.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The user needs to pass in a pointer to the array and the size of the array,&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;and the function will return a pointer to an array in the reverse order.&amp;nbsp;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;// this code was copied from cprogramming.com&lt;br /&gt;
// my respects for posting this code with &lt;br /&gt;
// no official whereabouts as to where it was from&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int*ReverseArray(int*orig,unsigned short int b)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned short int a=0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int swap;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for(a;a&amp;lt;--b;a++) //increment a and decrement b until they meet eachother&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; swap=orig[a];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //put what&#39;s in a into swap space&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orig[a]=orig[b];&amp;nbsp;&amp;nbsp;&amp;nbsp; //put what&#39;s in b into a&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orig[b]=swap;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //put what&#39;s in the swap (a) into b&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return orig;&amp;nbsp;&amp;nbsp;&amp;nbsp; //return the new (reversed) string (a pointer to it)&lt;br /&gt;
}&lt;br /&gt;
// the following is a test program&lt;br /&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; const unsigned short int SIZE=10;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int ARRAY[SIZE]={1,2,3,4,5,6,7,8,9,10};&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int*arr=ARRAY;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i=0;i&amp;lt;SIZE;i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout&amp;lt;&amp;lt;arr[i]&amp;lt;&amp;lt;&#39; &#39;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout&amp;lt;&amp;lt;std::endl;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arr=ReverseArray(arr,SIZE);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i=0;i&amp;lt;SIZE;i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout&amp;lt;&amp;lt;arr[i]&amp;lt;&amp;lt;&#39; &#39;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout&amp;lt;&amp;lt;std::endl;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cin.get();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/3640931796761455054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/function-to-reverse-integer-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/3640931796761455054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/3640931796761455054'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/function-to-reverse-integer-array.html' title='Function to reverse an integer array'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-4925936560513168748</id><published>2011-04-24T13:01:00.001+07:00</published><updated>2011-04-25T21:18:35.476+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><title type='text'>Array</title><content type='html'>The &lt;b&gt;array&lt;/b&gt; keyword lets you create a dynamic array that is allocated on the common language runtime heap. &lt;br /&gt;
&lt;div class=&quot;section&quot; id=&quot;syntaxSection&quot;&gt;&lt;div class=&quot;LW_CodeSnippetContainer&quot;&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=5343624780824062495&amp;amp;postID=4925936560513168748&quot; name=&quot;CodeSpippet0&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;LW_CodeSnippetContainerCodeCollection&quot; style=&quot;background-color: white;&quot;&gt;&lt;div class=&quot;LW_CodeSnippetContainerCode&quot; id=&quot;CodeSnippetContainerCode0&quot;&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;background-color: white;&quot;&gt;[qualifiers] [cli::]array&amp;lt;[qualifiers]type1[, dimension]&amp;gt;^ var = 
gcnew [cli::]array&amp;lt;type2[, dimension]&amp;gt;(val[,val...])&lt;/span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Parameters&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;dl style=&quot;background-color: white;&quot;&gt;&lt;dt&gt;&lt;span class=&quot;nonLinkTerms&quot;&gt; &lt;i&gt;dimension &lt;/i&gt;[optional] &lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;The number of dimensions of the array. The default is 1. The maximum is 32. &lt;/dd&gt;&lt;/dl&gt;&lt;dl style=&quot;background-color: white;&quot;&gt;&lt;dt&gt;&lt;span class=&quot;nonLinkTerms&quot;&gt; &lt;i&gt;qualifiers &lt;/i&gt;[optional] &lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;A storage class specifier. Valid keywords for &lt;i&gt;qualifier&lt;/i&gt; are: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/4h2h0ktk%28v=vs.80%29.aspx&quot;&gt;mutable&lt;/a&gt;, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/12a04hfd%28v=vs.80%29.aspx&quot;&gt;volatile&lt;/a&gt;, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/07x6b05d%28v=vs.80%29.aspx&quot;&gt;const&lt;/a&gt;, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/0603949d%28v=vs.80%29.aspx&quot;&gt;extern&lt;/a&gt;, and &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/s1sb61xd%28v=vs.80%29.aspx&quot;&gt;static&lt;/a&gt;. &lt;/dd&gt;&lt;/dl&gt;&lt;dl style=&quot;background-color: white;&quot;&gt;&lt;dt&gt;&lt;span class=&quot;nonLinkTerms&quot;&gt; &lt;i&gt;val&lt;/i&gt; &lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;A comma-separated list of the size of your array or an aggregate initializer. There should be one size &lt;i&gt;val&lt;/i&gt; for each &lt;span class=&quot;parameter&quot;&gt;dimension&lt;/span&gt;. For more information, see &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/2xfh4c7d%28v=vs.80%29.aspx&quot;&gt;Multidimension Arrays&lt;/a&gt;. &lt;/dd&gt;&lt;/dl&gt;&lt;dl style=&quot;background-color: white;&quot;&gt;&lt;dt&gt;&lt;span class=&quot;nonLinkTerms&quot;&gt; &lt;i&gt;type1&lt;/i&gt; &lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;The type of the array variable. Valid types are managed reference types (&lt;span class=&quot;parameter&quot;&gt;type&lt;/span&gt;&lt;b&gt;^&lt;/b&gt;), managed value types (&lt;span class=&quot;parameter&quot;&gt;type&lt;/span&gt;), and native pointers (&lt;span class=&quot;parameter&quot;&gt;type&lt;/span&gt;&lt;b&gt;*&lt;/b&gt;). A tracking handle is always required after the closing angle bracket (&amp;gt;) in the declaration. &lt;/dd&gt;&lt;/dl&gt;&lt;dl style=&quot;background-color: white;&quot;&gt;&lt;dt&gt;&lt;span class=&quot;nonLinkTerms&quot;&gt; &lt;i&gt;type2&lt;/i&gt; &lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;The type of the values initializing the array. Commonly, &lt;i&gt;type1&lt;/i&gt; and &lt;i&gt;type2&lt;/i&gt; will be the same types. However, it is possible for the types to be different, as long as there is a conversion from &lt;i&gt;type2&lt;/i&gt; to &lt;i&gt;type1&lt;/i&gt;. For example, if &lt;i&gt;type2&lt;/i&gt; is derived from &lt;i&gt;type1&lt;/i&gt;. Like &lt;i&gt;type1&lt;/i&gt;,  valid types are managed reference types, managed value types, and  native pointers. However, a tracking handle is not allowed after the  closing angle bracket (&amp;gt;).  &lt;/dd&gt;&lt;/dl&gt;&lt;dl style=&quot;background-color: white;&quot;&gt;&lt;dt&gt;&lt;span class=&quot;nonLinkTerms&quot;&gt; &lt;span class=&quot;parameter&quot;&gt;var&lt;/span&gt; &lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;The name of the array variable.   The number of elements of the array is not part of the type. A single array variable can refer to arrays of different sizes. Like  standard C++, the indices of a managed array are zero-based, and a  managed array is subscripted using ordinary C++ array brackets. Unlike  standard C++, subscripting is not a synonym for pointer arithmetic and  is not commutative. A  managed array is itself a managed object. It is actually a pointer into  the common language runtime heap. As a managed object, it has the same  restrictions as a managed class. Most notably, the element type cannot  be a native C++ class that is not a POD type. &lt;b&gt;array&lt;/b&gt; is in the cli namespace.  See &lt;span class=&quot;linkTerms&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/d87eee3k%28v=vs.80%29.aspx&quot;&gt;cli Namespace&lt;/a&gt;&lt;/span&gt; for more information. All managed arrays inherit from &lt;b&gt;System::Array&lt;/b&gt;. Any method or property of &lt;b&gt;System::Array &lt;/b&gt;can be applied directly to the array variable. When allocating an array whose element type is pointer-to a managed class, the elements are 0-initialized. When allocating an array whose element type is a value type &lt;tt&gt;V&lt;/tt&gt;, the default constructor for &lt;tt&gt;V&lt;/tt&gt; is applied to each array element. For more information, see &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/0wf2yk2k%28v=vs.80%29.aspx&quot;&gt;.NET Framework Equivalents to C++ Native Types&lt;/a&gt;. &lt;/dd&gt;&lt;/dl&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/4925936560513168748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/4925936560513168748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/4925936560513168748'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/array.html' title='Array'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-2950374394427026501</id><published>2011-04-23T19:45:00.001+07:00</published><updated>2011-04-23T19:48:19.224+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><title type='text'>String Contains function</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The strContains function returns true or  false depending on whether the input string contains the search string.  If you have ever used the contains function in C# or VB then you may  know how useful it can be.&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
bool strContains(const string inputStr, const string searchStr)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;size_t contains;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;contains = inputStr.find(searchStr);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;if(contains != string::npos)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Example */&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
bool strContains(const string inputStr, const string searchStr)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;size_t contains;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;contains = inputStr.find(searchStr);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;if(contains != string::npos)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;string sentence = &quot;Hello World, This is a test of the contains function&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;if(strContains(sentence, &quot;contains function&quot;))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cout &amp;lt;&amp;lt; &quot;It works!&quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;else &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cout &amp;lt;&amp;lt; &quot;Oops, time to rethink&quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;return 0;&lt;br /&gt;
}&lt;br /&gt;
/* End of example */</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/2950374394427026501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/string-contains-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2950374394427026501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2950374394427026501'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/string-contains-function.html' title='String Contains function'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-3097671258409074295</id><published>2011-04-19T23:59:00.001+07:00</published><updated>2011-04-20T10:51:39.865+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Jeliot 3"/><title type='text'>Power series determinan (jeliot 3)</title><content type='html'>import jeliot.io.*;&lt;br /&gt;
&lt;br /&gt;
public class calculate {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void input(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;specify the value n:&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; n=Input.readInt();&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void proses(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jumlah=0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; total=0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rumus=-1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int j=1; j&amp;lt;=n; j++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rumus=(rumus*(-1));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; total=rumus/j;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jumlah+=total;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(j==1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(+total);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(j&amp;gt;1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(+total);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;hasil penjumlahan deret = &quot;+jumlah);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
private int n;&lt;br /&gt;
private float rumus,jumlah,total;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hitung h=new calculate();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.input();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.proses();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/3097671258409074295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/power-series-determinan-jeliot-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/3097671258409074295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/3097671258409074295'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/power-series-determinan-jeliot-3.html' title='Power series determinan (jeliot 3)'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-5642938736981300549</id><published>2011-04-19T21:01:00.004+07:00</published><updated>2011-04-20T10:49:07.396+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Jeliot 3"/><title type='text'>Program determines the leap year (Jeliot 3)</title><content type='html'>import jeliot.io.*;&lt;br /&gt;
&lt;br /&gt;
public class leap {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main() {&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int thn;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println( &quot;Define leap year or not&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println ( &quot;Input Year&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; thn = Input.readInt();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (thn % 4 != 0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println (&quot;not a leap year&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((thn % 400 != 0) &amp;amp;&amp;amp; (thn % 100 == 0))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println (&quot;Not a leap year&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println ( &quot;leap year&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/5642938736981300549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/program-determines-leap-year-jeliot-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/5642938736981300549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/5642938736981300549'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/program-determines-leap-year-jeliot-3.html' title='Program determines the leap year (Jeliot 3)'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-9105152034878977562</id><published>2011-04-19T18:50:00.001+07:00</published><updated>2011-04-19T18:50:00.632+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Jeliot 3"/><title type='text'>FOUND GCD WITH JELIOT 3</title><content type='html'>import jeliot.io.*;&lt;br /&gt;
&lt;br /&gt;
public class MyClass {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main() {&lt;br /&gt;
int a=4,b=3,c=0;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
for(int x=1;x&amp;lt;=b;x++){&lt;br /&gt;
c=(c+a);&lt;br /&gt;
if(c%b==0){&lt;br /&gt;
System.out.println(c);&lt;br /&gt;
break;&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&amp;nbsp; }&amp;nbsp; &lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/9105152034878977562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/found-gcd-with-jeliot-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/9105152034878977562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/9105152034878977562'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/found-gcd-with-jeliot-3.html' title='FOUND GCD WITH JELIOT 3'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-5283813484771316910</id><published>2011-04-19T14:43:00.000+07:00</published><updated>2011-04-19T15:05:21.301+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Jeliot 3"/><title type='text'>Java programming exercise (Jeliot 3)</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Jeliot 3 is a Program Visualization application. It visualizes        how a Java program is interpreted. Method calls, variables, operation are        displayed on a screen as the animation goes on, allowing the student to        follow step by step the execution of a program. Programs can be created        from scratch or they can be modifyed from previously stored code examples. &lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;       The Java program being animated does not need any kind of additional calls,        all the visualization is automatically generated. Jeliot 3 understands most        of the Java constructs and it is able to animate them. Especial effort is        currenlty being addressed to animate object oriented features, such as inheritance. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The Program Calculates The Volume Of A Simple Circle (With Class)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
import jeliot.io.*;&lt;br /&gt;
&lt;br /&gt;
class VolumeLingkaran {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;static void main() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;double pi = 3.14;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;int r = Input.readInt();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;double Volume = (4/3)*pi*r*r*r; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;System.out.println(Volume);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.com/Lincoln-Lawyer-Novel-ebook/dp/B000FCKG1G?ie=UTF8&amp;amp;tag=belajarpe0e-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;The Lincoln Lawyer: A Novel&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=belajarpe0e-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B000FCKG1G&quot; style=&quot;border: medium none ! important; margin: 0px ! important; padding: 0px ! important;&quot; width=&quot;1&quot; /&gt;&lt;a href=&quot;http://www.amazon.com/21-Adele/dp/B004EBT5CU?ie=UTF8&amp;amp;tag=belajarpe0e-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;21&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=belajarpe0e-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B004EBT5CU&quot; style=&quot;border: medium none ! important; margin: 0px ! important; padding: 0px ! important;&quot; width=&quot;1&quot; /&gt;&lt;a href=&quot;http://www.amazon.com/Kindle-Wireless-Reader-Wifi-Graphite/dp/B002Y27P3M?ie=UTF8&amp;amp;tag=belajarpe0e-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;Kindle Wireless Reading Device, Wi-Fi, Graphite, 6&quot; Display with New E Ink Pearl Technology&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=belajarpe0e-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B002Y27P3M&quot; style=&quot;border: medium none ! important; margin: 0px ! important; padding: 0px ! important;&quot; width=&quot;1&quot; /&gt;&lt;a href=&quot;http://www.amazon.com/Kindle-Wireless-Reader-Wifi-Graphite/dp/B002Y27P3M?ie=UTF8&amp;amp;tag=belajarpe0e-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;Kindle Wireless Reading Device, Wi-Fi, Graphite, 6&quot; Display with New E Ink Pearl Technology&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=belajarpe0e-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B002Y27P3M&quot; style=&quot;border: medium none ! important; margin: 0px ! important; padding: 0px ! important;&quot; width=&quot;1&quot; /&gt;&lt;a href=&quot;http://www.amazon.com/Harry-Potter-Deathly-Hallows-Part/dp/B001UV4XHY?ie=UTF8&amp;amp;tag=belajarpe0e-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;Harry Potter and the Deathly Hallows, Part 1&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=belajarpe0e-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B001UV4XHY&quot; style=&quot;border: medium none ! important; margin: 0px ! important; padding: 0px ! important;&quot; width=&quot;1&quot; /&gt;&lt;a href=&quot;http://www.amazon.com/World-Never-Made-ebook/dp/B003K15EIY?ie=UTF8&amp;amp;tag=belajarpe0e-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;A World I Never Made&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=belajarpe0e-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B003K15EIY&quot; style=&quot;border: medium none ! important; margin: 0px ! important; padding: 0px ! important;&quot; width=&quot;1&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/5283813484771316910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/java-programming-exercise-jeliot-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/5283813484771316910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/5283813484771316910'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/java-programming-exercise-jeliot-3.html' title='Java programming exercise (Jeliot 3)'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-4206468658333999184</id><published>2011-04-18T17:54:00.000+07:00</published><updated>2011-04-18T17:54:12.689+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><title type='text'>RECCURENCE RELATION</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;use the iteration scheme for a SERIES of ISSUES the formula can be  expressed in relationship/recurring relationship, which concerns the  issue of accuracy of the representation of numbers on a computer.&lt;/div&gt;Example :&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;IT&quot;&gt;&lt;span&gt;Lineup&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;IT&quot; style=&quot;mso-ansi-language: IT;&quot;&gt; : 1,2,3,4,5,...,n&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;IT&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;Algorithm lineup&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;IT&quot; style=&quot;mso-ansi-language: IT;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Deklarasi&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;IT&quot; style=&quot;mso-ansi-language: IT;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;i,n : &lt;u&gt;integer&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Deskripsi&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;input&lt;/u&gt;(n)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;i&lt;span lang=&quot;DE&quot; style=&quot;font-family: Wingdings; mso-ansi-language: DE; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-char-type: symbol; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-symbol-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-char-type: symbol; mso-symbol-font-family: Wingdings;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;1&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;s&lt;span lang=&quot;DE&quot; style=&quot;font-family: Wingdings; mso-ansi-language: DE; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-char-type: symbol; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-symbol-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-char-type: symbol; mso-symbol-font-family: Wingdings;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;0&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;while&lt;/u&gt; (i&amp;lt;=n) do&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;output&lt;/u&gt;(i)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;i&lt;span lang=&quot;DE&quot; style=&quot;font-family: Wingdings; mso-ansi-language: DE; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-char-type: symbol; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-symbol-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-char-type: symbol; mso-symbol-font-family: Wingdings;&quot;&gt;ß&lt;/span&gt;&lt;/span&gt;i+1&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;u&gt;&lt;span lang=&quot;DE&quot; style=&quot;mso-ansi-language: DE;&quot;&gt;endwhile&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span lang=&quot;DE&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;The series S = 1 + 2 + 3 + 4 + 5 + ... + n&lt;/div&gt;&lt;br /&gt;
&lt;div lang=&quot;en&quot;&gt;The Algorithm To Calculate The series&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span lang=&quot;DE&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;table border=&quot;0&quot; id=&quot;TransContent&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; id=&quot;OutputTextHtmlCell&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;&lt;div class=&quot;mttextarea&quot; dir=&quot;ltr&quot; id=&quot;TranslationOutput&quot;&gt;&lt;div lang=&quot;en&quot;&gt;The Declaration Of&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;i, S, n: integer&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;Description&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;input (n)&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;i&amp;lt; 1&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;S &amp;lt; 0&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;while (i &amp;lt; = n) do&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;outputs (i)&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;S S + 1&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;i i + 1&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;endwhile&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;output (S)&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div lang=&quot;en&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:OfficeDocumentSettings&gt;   &lt;o:AllowPNG/&gt;  &lt;/o:OfficeDocumentSettings&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:WordDocument&gt;   &lt;w:View&gt;Normal&lt;/w:View&gt;   &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:TrackMoves/&gt;   &lt;w:TrackFormatting/&gt;   &lt;w:PunctuationKerning/&gt;   &lt;w:ValidateAgainstSchemas/&gt;   &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:DoNotPromoteQF/&gt;   &lt;w:LidThemeOther&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:Compatibility&gt;    &lt;w:BreakWrappedTables/&gt;    &lt;w:SnapToGridInCell/&gt;    &lt;w:WrapTextWithPunct/&gt;    &lt;w:UseAsianBreakRules/&gt;    &lt;w:DontGrowAutofit/&gt;    &lt;w:SplitPgBreakAndParaMark/&gt;    &lt;w:EnableOpenTypeKerning/&gt;    &lt;w:DontFlipMirrorIndents/&gt;    &lt;w:OverrideTableStyleHps/&gt;   &lt;/w:Compatibility&gt;   &lt;m:mathPr&gt;    &lt;m:mathFont m:val=&quot;Cambria Math&quot;/&gt;    &lt;m:brkBin m:val=&quot;before&quot;/&gt;    &lt;m:brkBinSub m:val=&quot;&amp;#45;-&quot;/&gt;    &lt;m:smallFrac m:val=&quot;off&quot;/&gt;    &lt;m:dispDef/&gt;    &lt;m:lMargin m:val=&quot;0&quot;/&gt;    &lt;m:rMargin m:val=&quot;0&quot;/&gt;    &lt;m:defJc m:val=&quot;centerGroup&quot;/&gt;    &lt;m:wrapIndent m:val=&quot;1440&quot;/&gt;    &lt;m:intLim m:val=&quot;subSup&quot;/&gt;    &lt;m:naryLim m:val=&quot;undOvr&quot;/&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:LatentStyles DefLockedState=&quot;false&quot; DefUnhideWhenUsed=&quot;true&quot;
  DefSemiHidden=&quot;true&quot; DefQFormat=&quot;false&quot; DefPriority=&quot;99&quot;
  LatentStyleCount=&quot;267&quot;&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;0&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Normal&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;heading 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 7&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 8&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 9&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 7&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 8&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 9&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;35&quot; QFormat=&quot;true&quot; Name=&quot;caption&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;10&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Title&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; Name=&quot;Default Paragraph Font&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;11&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtitle&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;22&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Strong&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;20&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Emphasis&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;59&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Table Grid&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Placeholder Text&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;No Spacing&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Revision&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;34&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;List Paragraph&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;29&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Quote&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;30&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Quote&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 1&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 2&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 3&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 4&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 5&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 6&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;19&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Emphasis&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;21&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Emphasis&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;31&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Reference&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;32&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Reference&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;33&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Book Title&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;37&quot; Name=&quot;Bibliography&quot;/&gt;   &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; QFormat=&quot;true&quot; Name=&quot;TOC Heading&quot;/&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin-top:0cm;
 mso-para-margin-right:0cm;
 mso-para-margin-bottom:10.0pt;
 mso-para-margin-left:0cm;
 line-height:115%;
 mso-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;
 mso-bidi-font-family:&quot;Times New Roman&quot;;
 mso-bidi-theme-font:minor-bidi;}
&lt;/style&gt; &lt;![endif]--&gt;                        &lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/4206468658333999184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/reccurence-relation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/4206468658333999184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/4206468658333999184'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/reccurence-relation.html' title='RECCURENCE RELATION'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5343624780824062495.post-2929508398203624814</id><published>2011-04-16T20:37:00.000+07:00</published><updated>2011-04-16T20:37:11.512+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algoritma dan Pemrograman"/><category scheme="http://www.blogger.com/atom/ns#" term="Laporan Praktikum Algoritma dan Pemrograman"/><title type='text'>Recursion</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Recursion is a programming technique that allows the programmer to express operations in terms of themselves.  In C++, this takes the form of a function that calls itself.  A useful way to think of recursive functions is to imagine them as a process being performed where one of the instructions is to &quot;repeat the process&quot;.  This makes it sound very similar to a loop because it repeats the same code, and in some ways it &lt;em&gt;is&lt;/em&gt; similar to looping. &lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt; On the other hand, recursion makes it easier to express ideas in which the result of the recursive call is necessary to complete the task.  Of course, it must be possible for the &quot;process&quot; to sometimes be completed without the recursive call.  One simple example is the idea of building a wall that is ten feet high; if I want to build a ten foot high wall, then I will first build a 9 foot high wall, and then add an extra foot of bricks.  Conceptually, this is like saying the &quot;build wall&quot; function takes a height and if that height is greater than one, first calls itself to build a lower wall, and then adds one a foot of bricks.&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A simple example of recursion would be: &lt;/div&gt;&lt;pre class=&quot;example&quot;&gt;void recurse()
{
  recurse(); //Function calls itself
}

int main()
{
  recurse(); //Sets off the recursion
}
&lt;/pre&gt;This program will not continue forever, however. The computer keeps  function calls on a stack and once too many are called without ending,  the program will crash. Why not write a program to see how many times  the function is called before the program terminates? &lt;pre class=&quot;example&quot;&gt;#include &amp;lt;iostream&amp;gt;

using namespace std;

void recurse ( int count ) // Each call gets its own count
{
  cout&amp;lt;&amp;lt; count &amp;lt;&amp;lt;&quot;\n&quot;;
  // It is not necessary to increment count since each function&#39;s
  //  variables are separate (so each count will be initialized one greater)
  recurse ( count + 1 );
}

int main()
{
  recurse ( 1 ); //First function call, so it starts at one        
}
&lt;/pre&gt;This simple program will show the number of times the recurse function  has been called by initializing each individual function call&#39;s count  variable one greater than it was previous by passing in count + 1. Keep  in mind, it is not a function restarting itself, it is hundreds of  functions that are each unfinished with the last one calling a new  recurse function.  &lt;br /&gt;
&lt;br /&gt;
It can be thought of like the Russian dolls that always have a smaller  doll inside. Each doll calls another doll, and you can think of the size  being a counter variable that is being decremented by one.  &lt;br /&gt;
&lt;br /&gt;
Think of a really tiny doll, the size of a few atoms. You can&#39;t get any smaller than that, so there are no more dolls. Normally, a recursive  function will have a variable that performs a similar action; one that controls  when the function will finally exit. The condition where the function will  not call itself is termed the base case of the function. Basically, it  is an if-statement that checks some variable for a condition (such as a  number being less than zero, or greater than some other number) and if  that condition is true, it will not allow the function to call itself  again. (Or, it could check if a certain condition is true and only then  allow the function to call itself).  &lt;br /&gt;
&lt;br /&gt;
A quick example: &lt;pre class=&quot;example&quot;&gt;void doll ( int size )
{
  if ( size == 0 )   // No doll can be smaller than 1 atom (10^0==1) so doesn&#39;t call itself
    return;          // Return does not have to return something, it can be used
                     //  to exit a function
  doll ( size - 1 ); // Decrements the size variable so the next doll will be smaller.
}
int main()
{
  doll ( 10 ); //Starts off with a large doll (it&#39;s a logarithmic scale)
}
&lt;/pre&gt;This program ends when size equals one. This is a good base case, but if  it is not properly set up, it is possible to have an base case that is  always true (or always false).  &lt;br /&gt;
&lt;br /&gt;
Once a function has called itself, it will be ready to go to the next  line after the call. It can still perform operations. One function you  could write could print out the numbers 123456789987654321. How can you  use recursion to write a function to do this? Simply have it keep  incrementing a variable passed in, and then output the variable...twice,  once before the function recurses, and once after... &lt;pre class=&quot;example&quot;&gt;void printnum ( int begin )
{
  cout&amp;lt;&amp;lt; begin;
  if ( begin &amp;lt; 9 )         // The base case is when begin is greater than 9
  {                           //  for it will not recurse after the if-statement
      printnum ( begin + 1 ); 
  }
  cout&amp;lt;&amp;lt; begin;         // Outputs the second begin, after the program has
                              //  gone through and output
}
&lt;/pre&gt;This function works because it will go through and print the numbers begin to 9, and then as each printnum function terminates it will continue printing the value of begin in each function from 9 to begin.  &lt;br /&gt;
&lt;br /&gt;
This is just the beginning of the usefulness of recursion. Here&#39;s a  little challenge, use recursion to write a program that returns the  factorial of any number greater than 0. (Factorial is  number*number-1*number-2...*1).  &lt;br /&gt;
&lt;br /&gt;
Hint: Recursively find the factorial of the smaller numbers first&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ipank05018240.blogspot.com/feeds/2929508398203624814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/recursion.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2929508398203624814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5343624780824062495/posts/default/2929508398203624814'/><link rel='alternate' type='text/html' href='http://ipank05018240.blogspot.com/2011/04/recursion.html' title='Recursion'/><author><name>Panggung Dwi Kuncoro</name><uri>http://www.blogger.com/profile/10513047864453959977</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>