Pages

Friday, December 7, 2012

Learning the basic algorithm.


Writing Notation Algorithm
Writing the algorithm is independent of programming language specification and execute computer. Notation notation algorithm is not programming language, but can be translated into different programming languages. Here is an example of notation algorithm
Notations are expressed in descriptive sentences

With this otasi, descriptive each step is explained with clear language. This notation is suitable for short algorithm. But to issue a lengthy algorithm, the notation is clearly less effective. In addition to the conversion algorithm notation language notation program tends rather difficult.
Example:
Algorithms seek a rectangle;
Given the length and width of a rectangle. Find the area and perimeter of rectangles.

Description:
1. Input the length of the rectangle.
2. Input the width of the rectangle.
3. Find a large rectangle with a formula; length times width.
4. Search around the rectangle with the formula: two times the length plus two times the width.
5. Take out the area and perimeter as the output ..
6. Calculations done.
Flow chart
Flow chart or flow chart is a picture or a chart showing the relationship between the sequence and its instructions. These figures represented by the symbol. Thus each symbol illustrates a particular process. While the relationship between the process described by a hyphen.
Flowchart is an initial step programming. With the sequence of poses flowchart of activities becomes more apparent. If there are additional processes can be performed more easily. Once the flowchart is completed, the next programmer (programmer) translates into shape program with the programming language.
Notation writing fitting algorithm with flow chart for a short algorithm. As for the problem of a long algorithm, the notation is less effective and penkorversian notation algorithms into a programming language notation tends to be somewhat difficult.

So first my post this time, the next opportunity I will continue the discussion of notation writing algorithm (flowchar & pseudo code):
Flowchart symbols
Example of a simple program flow chart
Examples of writing represented by the pseudo code.
Thank you for visiting. Please feedback and suggestions for improvement of this discussion.
Wasalam author.

0 comments:

Post a Comment