This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Showing posts with label Rangkuman ALPRO. Show all posts
Showing posts with label Rangkuman ALPRO. Show all posts

Sunday, March 24, 2013

COUNTING



Dalam penyelesaian algoritma yang memerlukan pengulangan perlu adanya counting atau perhitungan. Dengan cara ini maka proses algoritma yang terdapat perhitungan akan lebih mudah di kerjakan tanpa harus memasukkan proses satu persatu. Counting adalah suatu proses penambahan sesuai dengan ketentuan yang telah ditentukan oleh programmer, jika sebuah counting telah melewati kondisi yang telah ditentukan maka proses counting akan berhenti.

EXCHANGING THE VALUE OF TWO VARIABLE



Problem:
Diberikan 2 variable, a dan b, ditukarkan antara nilai yang ada didalam a ke dalam b, begitu pula sebaliknya, nilai b di tempatkan ditempat a.
Algoritma:
-          Jika kita mempunyai 2 tempa t yang telah tersisi oleh  nilai, maka tidak mungkin ke-2 nilai tersebut saling ditukar secara langsung. Karena apa? Karena jika di tukar secara langsung maka kejadiannya adalah nilai tersebut tidak akan saling bertukar tempat, malahan akan menghasilkan nilai yang sama jika kondisi yang di berikan adalah a==b. Begitu pula dengan b==a.