Algorithm
Web Dev
Programming Language
Version Control
Database
Unix/Linux
Testing
Code
More...
Open Source Projects
We can give any reasonable name to an algorithm module. Example
Sum()
FindHighScore()
findTime()
We will use lowercase for variable name. Example
name age
highScore isGameOver
For initializing variable we will use the word Set Example
Set score = 0;
Set x = 0, y = 0, score = 0, isGameOver = false;
Data may be input and assigned to variable using Read statement.
Read: variable list
Read: x;
Read: x, y, z;
Message and data in variables may be output by using Write or Print statement.
Write: Message and/or variable list
Print: Message and/or variable list
Write: “Hello World”; //message Print: “Value of x = ”, x; //message and variable
Algorithm will start with a Begin statement and will end with an End statement.
Algorithm is completed with the execution of the last instruction. However, we can terminate the execution at any stage using Exit instruction.
We generally divide complex problem into small manageable sub problems and then we develop algorithm for each of the sub problems, called sub algorithm.
We will use the Call statement to call any algorithm module from another module.
Recently Updated