How to work with relational operators
To work with relational operators
Step 1
Description:
A sequence of identifiers, separated by compatible operators, that evaluates to TRUE or FALSE
Declaration:
Operator Operation
= Equal
Not equal
<>
> Greater than
<= Less or equal
>= Greater or equal
Example:
if player1 > player2 then
Writeln(' The winner is player 1');
if player1 <>
Writeln(' The winner is player 2');
if player1 = player2 then
Writeln(' No winner in this game ');
No comments:
Post a Comment