• 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, April 22, 2011

Materi Pemrograman Web Universitas Ahmad Dahlan


Buat teman – temen yang ikut mata kuliah pemrograman web, saya turut membantu menyebarkan materi. Kalian semua bisa mendownload disini :

1st.      Internet dan Web
3rd.    HTML Dasar
4th.    HTML Lanjut
5th.    CSS
6th.    Javascript Dasar
7th.     Javascript Lanjut

Selamat mendownload dan selamat belajar kawan. Semoga kita sukses. Amin..
Readmore

Greatest Common Divisor (GCD) : Faktor Persekutuan Terbesar

Faktor pembagi terbesar (FPB) is the largest bialangan positive integers that can divide up the two numbers. To find the gcd can use a simple way (factor trees), factorial and the Euclidean algorithm.

How to determine the FPB is to look at factors such numbers and using prime factorization. Which he takes the rank is the lowest rank.

Example :
Find the gcd of 6 and 8 by looking at the factors in these numbers!
Factor of 20 = {1, 2, 3}
Factor of 30 = {1, 24}
Thus, the gcd of 6 and 8 is 2

Now we can make the algorithm to make the program determines the gcd of two numbers are entered. Suppose we inputkan m and n. m and n are not negative integers. To find the FPB we must determine the greatest value, for example (m> = n), then the algorithm to find gcd ( algoritma Euclidean) are as follows (with pseudocode):
1.         If n = 0 then m is gcd (m, n), but if n ≠ 0 go to step 2.
2.         Divide m by n and let r be the remainder.
3.         Change the value of m with a value of n and n values ​​with the values ​​of r, and then reset back to step 1.
To perform the third step we can use goto.

Examples of the program as follows



For more details please take here FREE!
Readmore

Wednesday, April 20, 2011

Prime Numbers: Determining the Type A Numbers


In the discussion this time I want to discuss the issue of primes. What is a prime number? Prime number is a positive integer more than one and the number is no trace if divided by one and the number itself. From these definitions we can make inferences primes are numbers that are only produced no trace of value if divided by two times, divided by one and the number itself. Immediately, in the example algorithms and programs. Then we can make the algorithm as follows :

Algoritma Prime Numbers
                {Specifies the type of an input number, primed or not primed}
Deklarasi
                 a : integer (inialisasi)
       x : integer (input)
Deskripsi
                Read (x)
      a  <--  0
      for 1 to x do {
      if (x % i == 0) then a++
      }
      if (a == 2) then write (“bilangan prima”)
      else then write (“bukan bilangan prima”)

Writing functions in a program like this (in C + +) : 

 
For a complete C + + program you can download here dyas sembilanpoepoeh.cpp
For a complete  Java  program you can download here dyas sembilanpoepoeh.java
Readmore

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

To Up