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

Friday, May 6, 2011

Pretes dan Postes Praktikum ke-7 Algoritma dan Pemrograman

Download dibawah ini :




Readmore

Rekursif : Calculating the Value Program with Recursive Factorial (Program Menghitung Nilai Faktorial dengan Rekursif)

In mathematics, the factorial of n natural numbers is the result of multiplication of positive integers less than or equal to n. Factorial written as n! and is called n factorial.

For example, 5! is worth 5×4×3×2×1 = 120.

Recursive function is a function that does the loop by calling itself.
The definition is recursive, which is defined for n>= 0












C++ is recursively defined as follows











Complete the program you can downloaded here

referensi :
Readmore

Tuesday, May 3, 2011

Jeliot version : Make a Pyramid Star with Jeliot (Menbuat Piramida Bintang dengan Jeliot)


Sometimes - sometimes at the university each began learning the looping problem (loop) we will see a task to create a pyramid of stars. Therefore I will discuss the issue and help solve it.
To create a pyramid of stars we have to use nested loops. Nested iteration loops is contained in the loop. The loop is suitable for making this pyramid is using for loop. Why choose for loop? Because of this loop for sure. We will repeat how many times can be determined easily.
How does the writing program ?
Here I use the compiler Jeliot, so that the manufacturing process can be seen easily. So it can easily to be understood. First we create a loop to limit / line. After that we created also in the loop iteration space in order to print can bitang sebada middle. The second we live looping to create a star print.
Let not this footage dizziness program :
    // to determine the line
for (baris=1;baris<=tinggi;baris ++){
                 //print the space
                 for (i=1;i<=tinggi-baris;i++){
       System.out.print(" ");
       }
                 //star print
                 for (j=1;j<2*baris;j++){
       System.out.print("*");
       }
System.out.println();
}

After dbuat program and will run resulting in output like the following :

For program details can be downloaded here. Hopefully helpful friend. Do not forget to comment!
Readmore

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

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

To Up