Algorithm Programming Using C + +

18 Apr

Algorithms such as the word most people, not something that is only associated with the computer world only. The algorithm is also applicable in everyday life. This time I want to discuss an example that may seem not “commonly” used to give an idea of ​​the algorithm:-D.

Some simple examples of algorithms that can be encountered in daily life – the day for example:

1. Making Tea

The process is as follows: prepare equipment such as spoons, cups, tea and sugar (of course), put the tea and sugar in a cup, put hot water into a cup, stir until sugar and tea mixture, and tea ready to drink …: D (koq so pengen yah tea?: D)

2. Call

The process is as follows: pick up the phone, press the phone number:

· If removed then start talking when you’re done hang up

· If not removed, then hang up

And many more examples – simple example of an algorithm that can be encountered in daily life – days.

Programming Algorithm

Now we start talking about programming algorithm.

– typical characteristics of the algorithm as described by Donald E. Knuth:

· algorithm has a beginning and end.

· Each step must be defined precisely so that no double meanings (ambiguity).

· Having input (input) or initial conditions.

· Having output (output) or the end.

· algorithm must be effective, when used correctly – really solve the problem.

I myself was not really agree with it – things like that that seem too restrictive. Because there are actually many ways to produce something without having to follow rules that are “standard” / one rule that impressed binding, right? But if one wants to “act” as has been described above, it is legitimate – legitimate only.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: