Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Greater than operator: Difference between revisions

From Coderwiki
new
 
m replace 'conditional operator' with 'comparison operator'
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
One common [[conditional operator]] is the '''greater than operator'''.
One common [[comparison operator]] is the '''greater than operator'''.


This operator will return [[Boolean|true]] if the value on the '''left''' is '''greater than''' the value on the '''right''' of the operator.
This operator will return [[Boolean|true]] if the value on the '''left''' is '''greater than''' the value on the '''right''' of the operator.


== Syntax ==
== Syntax ==
In most languages, the less than operator is represented by a <code>></code> symbol.
In most languages, the greater than operator is represented by a <code>></code> symbol.


== Example ==
== Example ==

Latest revision as of 10:25, 9 August 2025

One common comparison operator is the greater than operator.

This operator will return true if the value on the left is greater than the value on the right of the operator.

In most languages, the greater than operator is represented by a > symbol.

boolean a = 4 > 6; // false
boolean b = 6 > 5; // true