In our algorithm, if the value of the variable n1 is less than 0, we exit the loop and control goes to the endif keyword that terminates the selection. On the other hand, if the value of the variable n1 is greater than or equal to 0, the next two statements are executed, and when the endloop keyword is encountered following the 2nd statement, control jumps up to the instruction following the loop keyword. To the right of the assignment operator is an expression. The value of that expression is assigned as the value of the variable on the left-hand side. The old value of n1 is overwritten.
Expression evaluation is a crucial part of algorithms.
First, an expression consists of one or more identifiers or literals separated by an operator. We say that the value of the literal 5 is itself. An arithmetic expression is an expression that evaluates to a numeric value. A Boolean expression is an expression that evaluates to be true or false. TRUE is a constant that denotes true.