# PASCAL

CONDITIONAL **IF** INSTRUCTION

In logical expressions we use comparison operators ** =, <>, <, >, <=, >=**
(equal to, miscellaneous, smaller, larger, smaller or equal, larger or equal)
** and** and **or** logic operators.

*Examples:*

**if a>b then write('The first number is greater than the second.') else
if b>a then write('The second number is greater than the first.') else
write('The numbers are equal.');
if (a>=b) and (b>=c) then write(' The first number is the highest.');**

CONDITIONAL **CASE** INSTRUCTION

This is a instruction that allows you to check multiple conditions without having
to write multiple **if** instructions.

*Example:*

**
randomize; {switching on the random generator }
los = random(100)+1; {random a number from 1 to 100}
case los of
11: write('You have won the car.');
27: write('You have won the book.');
39: write('You have won chewing gum.');
else write('You have not won anything!');
end;**