+ 4
How is an algorithm implemented in programming?
What is an algorithm and how it works? Is it like an ascii table ?
2 Réponses
+ 2
+ 1
It's not like an ascii table I'll give you a Hello World example:
Begin
var myVariable: String
myVariable <—— "Hello World!"
write(myVariable)
End
So that goes just as if you're explaining in plain English how your code works: That's an algorithm.
To answer your other question, it's implemented by knowing how to write each part of it in the programming language you want.
For example, if we choose python and our Hello World algorithm,the equivalent code is the following:
myVariable = "Hello World"
print(myVariable)
In JavaScript:
var myVariable;
myVariable = "Hello World"
alert(myVariable)