• Pada Algoritma pencarian banyak yang bisa kita temukan atau gunakan. Ada Merge Sort, Quick Sort, Bubble Sort, dan...
  • Pada dasarnya algoritma searching banyak kita jumpai. Apalagi hanya untuk mencari nilai minimum dan nilai maximum...
  • Kalian pasti sudah tahu apa itu Deret Fibonacci, ya benar. (Padahal gak jawab). Tetapi pada pembahasan kali ini kita akan membuar program...
  • Metoda Pencarian Biner ( Binary Search) hanya bisa diterapkan jika data array sudah terurut. Pengurutan Array bisa menggunakan jenis sorting ...
  • Salah satu contoh tipe algoritma brute force lainnya adalah linear search (pencarian berurutan), Dikatakan demikian karena algoritma ini menggunakan ...

Saturday, April 30, 2011

Modulus : Reversing the Value (Membalik Nilai)

Here I will discuss how to use modulus to separate a value, so that we can use it according to our purposes. For example, here I want to use it for my memebantu reverse the order of a value. 1234 inputkan our example, then the output 4321.
For the process as follows :
void balik::proses(){
     a = nilai / 1000;
     b = nilai % 1000;
     c = b / 100;
     d = b % 100;
     e = d / 10;
     f = d % 10;
     }

The final step adapted to living calling purposes only. In order not curious please download the program at here
Readmore

Rekursif : Strange Result Calculating Series (Menghitung Hasil Deret Aneh)


Series is given as follows  :







How to find value? We can make use of recursive programs. Now we see a plus sign (+) min (-) it. How do I tell? Absolutely, which is worth an odd marked plus (+) and a marked positive value min (-). From these observations we can use it as a key telling the program making.
Now we make a recursive program :
Proses_rekursif(int n){
      if(n==0) return 0;
      else if(n==1) return 1;
      else if(n%2==0) return (-(1.0/n)+(proses2(n-1)));
      else return ((1.0/n)+(proses2(n-1)));
      }

You're curious about the full results? Definitely curious! Download HERE.
Readmore

Friday, April 29, 2011

Games : Permainan Seru Penuh Teka - teki


Buat temen – temen yang sempat mampir diblog saya ini, ada permainan seru lagi yang bisa dicoba. Permainan ini saya dapat dari dosen saya. Berapa kali kalian mencoba sehingga kalian menemukan nilai yang benar?! Hasil dari percobaan anda bisa ditulis dikomentar. Rekor tertinggi saya tunggu..
Untuk mendownload kalian bisa memilih :
»       From ziddu.com
»       From fileserve.com
Readmore

Tuesday, April 26, 2011

Rekursif : Example Programs with Recursive Multiplication (Contoh Program Perkalian dengan Rekursif)


Recursive means that a process can call itself. Recursive definition is actually contained in the procedures and functions. The difference is that the recursive call to itself can be, but the procedures and functions must be called by the caller procedures and functions. Recursive programming techniques are important and some programming languages ​​support the existence of this recursive process. In procedures and functions, the call to itself can mean an iterative process that can not be known when it will end.

Now I will make an example of multiplication program (axb = a + a + a +...+ a total b times) by using recursive. Multiplication recursively can be written as follows :
                (a x b) = a + a +...+a (sebanyak b kali)
       (a x b) = a + (a x (b-1))


that programming can be written as
kali(a,b) = a + (kali(a, (b-1)))

We can make a recursive function as follows :


For complete program can be downloaded at dyas sembilanpoeloeh
Hopefully helpful friend..
Readmore

Tutorial Algorithm and Programming ©Template Blogger Green by Dicas Blogger.

To Up