iklan banner

Pseudocode Of Algorithm

Pseudocode is a way of writing algorithms that resemble high-level programming languages. Pseudocode uses a language that almost resembles a programming language. Usually pseudo-code uses a language that is universally easy to understand and also more concise than algorithms. Pseudocode contains a description of a computer programming algorithm that uses the simple structure of some programming languages but the language is only intended to be readable humans. So that pseudocode can not be understood by the computer. So that pseudocode notation can be understood by computer then it must be translated first become syntax of certain computer programming language.

In pseudocode, there is no official standard syntax. Therefore, this pseudocode
can be applied in various programming languages. It is recommended to use commonly used keywords such as: if, then, else, while, do, repeat, for, etc. The advantage of using pseudocode notation is the ease of translating to programming language notation, because there is correspondence between each pseudocode and programming language notation.

The structure of pseudocode writing is generally the same as the writing structure
algorithm by using descriptive sentence that starts from title / header,
declaration / dictionary and end with description. Although there is no special syntax in writing pseudocode, but sometimes pseudocode is written using the style or style of writing from several existing programming languages, such as Fortran, Pascal, C and others.

Here is an example of pseudocode writing using the style of writing some programming languages:

Fortran style
program TikTok
do i=0to100
set flag to true
if i is divisible by 3
print ”Tik”
set flag to false
if i is divisible by 5
print ”Tok”
set flag to false
if flag, print i
print a newline
end do

Pascal style
procedure TikTok
for i:=0to100 do
set flag to true;
if i is divisible by 3 then
print ”Tik”;
set flag to false;
if i is divisible by 5 then
print ”Tok”;
set flag to false;
if flag, print i;
print a newline;
end

C style
void function TikTok
for(i=0;i<=100;i++){
set flag to true;
if i is divisible by 3
print ”Tik”;
set flag to false;
if i is divisible by 5
print ”Tok”;
set flag to false;
if flag, print i;
print a newline;
}

Similarly this article.
Sorry if there is a wrong word.
The end of word wassalamualaikum wr. wb

Referensi :
  • Ebook Logical and Algorithm

Sumber http://matematikaakuntansi.blogspot.com

0 Response to "Pseudocode Of Algorithm"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel