An Algorithm in Programming

Algorithm in Programming
After we discuss about Algorithms and Programming, so now we will discuss about algorithms in a programming.

In a programming algorithm is a sequence of procedures or steps that have been taken into account systematically to resolve a problem with a computer programming language that has been defined. Algorithm as a sequence of steps or procedures, there is the beginning and the end.

When referring to the opinion of Knuth, when developing the algorithm and programming, there are some necessary condition that must always be considered by a programmer or programmer. The first thing to note when someone makes the algorithm is the finiteness of all processes within the program that must be made is final.

Then the second element that must be considered in making the programming algorithm and each step in the program is made very clear or definiteness, not have ambiguous things that will affect the sustainability of a program.

Every algorithms and programming should have the output, but has absolutely no input. In a program, algorithm language should be made so simple but still effective in accordance with the purpose of making the program. That guides in developing algorithms and programming.

Apart from having to meet certain requirements or rules as expressed by Knut in making algorithms and programming, the algorithm also consists of several types depending on the types of instruction or guidance program itself. The first type of algorithm is in a programming sequence.

Type sequence algorithm is based on the form of instructions that are assigned sequentially. However, if the instruction is made such that the algorithm is based on the specific standards or specific criteria, then this type of algorithm is called selection algorithm.

Meanwhile, if the instruction is done by algorithms that satisfy certain conditions, then this type of algorithm is known as the iteration algorithm. And last is the kind of concurrent algorithms. Concurrent algorithm is an algorithm that uses a lot of instructions on the process are performed simultaneously.

Both algorithms sequence, algorithm selection, algorithm or algorithms concurrent programming iteration in the equally important. Several types of algorithms and programming continues to be one entity chosen by the necessities or the desired output.

To further clarify the algorithms and programming, there is a simple example below. For example, we will create a program to find or calculate the area of a square shape. So, the output is the area of a square shape. Algorithms and programming for this case there are several steps: first is to enter the long side (S), and the width and the latter is a broad writing. That algorithm and simple programming.

Explanation of the steps of the algorithm can be made in the form of pseudo code that is specific tagging or coding in writing an algorithm. Consider the writing of algorithms and other programming, as well as how tagging or written explanation in the form of pseudo code.

For example, a problem that must be made of the program is looking for the smallest number of multiple numbers. Writing algorithms and programming it is through a five-step instructions. First, enter the first number. Second, insert the second number and so on.

The third step is an instruction that states the first number from the second number, then continue to step four. If the first number is not from the second number, then do step 5. Fourth step is to display the first number. The fifth step, show number two.

Algorithms and programming of the above cases can be written with coding or written using pseudo code, so it looks more clear to understand instructions and programming algorithms earlier. Pseudo code for the above case based algoritama and pemrogamannya are as follows: (1) Input X, (2) Y Input, (3) If XY then step 5 else step 4, (4) Write Y and (5) Write X.

Algorithm and Programming Language


It is understood that the algorithm is a sequence of procedures or steps that have been taken into account systematically remedy resolve a problem. While the definition of programming is an instruction that directs or arrange for the conduct or a particular work based on the steps or procedures (algorithms).

To realize such a move instruction, so that the computer can translate as expected, then it should use language that is understood by the computer.

Talking about language that can be understood by the computer, in a technique known as two-level programming languages are low level languages and high level languages. Low-level language is a language understood by the computer that a machine language and assembler.

Machine language and assembler said in a low level language programming language because it uses code 0 and 1, or known as binary code. While the language is much higher than that, the language that uses a more complicated coding. Type in a high level programming language is Basic, Pascal, Turbo Pascal, Java and others.

0 comments:

Post a Comment