Algorithm Example In Pseudocode
Computing / / July 04, 2021
A algorithm is a way of writing a programming code more appropriate to our language. And that we as well as other people can see it. It does not necessarily have to be written in a programming language specific. Through a algorithm can be passed to different programming languages easily, having the basic idea in the algorithm.
Words from our Spanish language can be used, or in English. That is at the discretion of the person performing the algorithm. There is no exact way to perform a algorithm, but it is easily understood both for the one who performs it, and for those who have to review it.
Here I leave you 3 different algorithm example, they all do the same solution, but they are written in different ways
Code:value = 0
As long as (value is less than 20) {
show value
value = value + 1
If (value is equal to 10) {
show "I like 10"
}
}
Code:Home Program
value = 0
As long as (value is less than 20)
Show value
value ++
Yes (value is equal to 10)
Show "I like 10"
End yes
End While
End Program
Code:value = 0
while (value> = 20) {
show value
value = value + 1
if (value == 10) {
show "I like 10"
}
]