Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Relational operators compare two values and return a boolean result — true or false. Essential for conditionals and loops.
==Equal to5 == 5→true!=Not equal to5 != 3→true<Less than3 < 5→true>Greater than7 > 2→true<=Less or equal5 <= 5→true>=Greater or equal6 >= 9→falseDon't confuse = (assignment) with == (comparison). Using if (x = 5) assigns 5 to x instead of comparing!