Command If (CONDITION_is_TRUE) Then COMMAND1

Using a Logical Expression (LE) , this command lets you select the execution of a set of commands (it can be just one) according to the logical result of the expression LE. Symbolically: If LE to be true, then execute commands.
Optionally, a else can be used, that is, if the logical expression results false, a second set of commands will be executed. Symbolically:
IF (LE_results_true) then EXECUTE_TRUE_COMMANDS, else EXECUTE_FALSE_COMMANDS.

In the example in fig. 1 the logical expression LE is to verify if the value registered on variable n is equal to the constante 10. It was used only one command under each flow option, but it is possible to use several or even none under if or under the else flow option.


Fig. 1. Example of program with if-else command.

In the above code it is used an integer variable and the user must enter an integer value. If the value is 10, then the message The entered value was precisely 10..
On the other hand, if the user enter any value but 10, the message to be presented will be The entered value was not 10..
Try to improve this code printing, on the second case, also the entered value (variable n).