Tampilkan postingan dengan label Programer. Tampilkan semua postingan
Tampilkan postingan dengan label Programer. Tampilkan semua postingan

Senin, 30 Maret 2009

Algorithm II

Exchange algorithm ISI vessel
Given two vessels A and B, a vessel containing
solvent red, vessel B contains a solution
blue. Pertukarkan content of the second vessel
A vessel so that the solution contains color
blue and vessel B contains a red solution.
DESCRIPTION:
1. Pour solution from a vessel into the vessel C.
2. Pour the solution from the vessel in vessel B to A.
3. Pour the solution from the vessel in the vessel C to B.
The important algorithms
• Algorithm must stop after
a limited number of steps.
• Each step must be defined
with appropriate and does not mean two -
(Ambiguous).
• Algorithm has zero or more
entered.
• Algorithm has zero or more
output.
• algorithms must be effective (each step
must be simple so that it can
done in the entrance
pate).

Algorithm

Definition of algorithms is the order langkahlangkah
logical problems that
arranged systematically.
Example:
Exchange algorithm ISI vessel
Given two vessels A and B, a vessel containing
solvent red, vessel B contains a solution
blue. Pertukarkan content of the second vessel
so that a vessel containing the solution
blue and vessel B contains the solution color
red.
DESCRIPTION:
- Pour the solution from the vessel A to B in the vessel
- Pour the solution from the vessel in vessel B to A.

Algorithm
• Algorithm exchange vessel on the ISI does not
the exchange of the truth.
Step above is not logical, the exchange
happens is that mixing the two
the solution is.
• To replace the contents duah vessel,
required as an additional vessel
temporary shelter, for example,
vessel C. Then algorithm for
the exchange is the correct
as follows

Program Computer

Programming Languages.

• Programs must be written in a
language that is understood by
in the computer language
Programmers can be divided into:
- Low-level language (low level
language): language-oriented
to the engine.
- High-level language (high level
language): language-oriented
to humans (such as the English language)
example the language Pascal, C language etc..

Programming Languages.
• Programs written in
programming will be translated
into the machine language (known
with the binary digits) with the
using an interpreter.
Interpreter:
- Interpreter: translate per line
line instruction. Sample Basic language.
- Compiler: menterjamahkan after
all written instructions. Example
languages Pascal, C, Ada, C + +, etc..