pascal if then else

Pascal If-Then-Else Statement in Pascal Language

In Pascal, the if-then-else statement is used for conditional execution. It has the following syntax:

if condition then
   statement1
else
   statement2;

The condition is evaluated, and if it is true, statement1 is executed; otherwise, statement2 is executed.