• 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 ...

Monday, May 2, 2011

Phytagoras : Calculating the Triangle Elbow Side (Menghitung Sisi Segitiga Siku - Siku)

In mathematics, the Pythagorean theorem is a relation in Euclidean geometry among the three sides of a right triangle. This theorem named after the Greek philosopher and mathematician, 6th century BC, Pythagoras. Pythagorean theorem is often regarded as the inventor of this despite the fact that the facts of this theorem is already known by mathematicians Indian, Greek, Chinese and Babylonians long before Pythagoras was born. Pythagoras is credited as the first to prove the universal truth of this theorem by mathematical proofs.

Pythagorean Theorem states that :
Extensive number of squares on the legs of a right triangle equals the area in square hipotenus. Or more akrapnya is the square of the hypotenuse equals the sum square of the other.

A triangle is a triangle having a right angle; his feet are two sides that form a right angle, and hipotenus is a third side opposite the right angle is. In the picture below, a and b are the legs of a right triangle and c is hipotenus :


 

c2 = a2 + b2

Pythagorean theorem states goemetris in style, as a broad statement about the square:
Extensive number of blue squares and red squares equals the area purple.

For that I want to create a program that can calculate the one side of the triangle seku - elbow. In this program there is the selection of inputs. Side - which side are already known so that it can be input and the unknown side of the output.

For the formula I created like this :


There are many variations of the formula for its program. To try it you can download it at here 
referensi : wikipedia.com
 
Readmore

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