Logical expression. | Sololearn: Learn to code for FREE!


Logical expression.

I need a help on logical expressions such as "<" and ">" operators. Is this expression "a<b<c" is valid? Anyone can explain?

5/30/2020 12:16:34 AM

Justin VI

2 Answers

New Answer


It depends on the language: it is valid in Python, for example, but not valid in languages with C-like syntax. You can achieve the same logic by doing (a < b) && (b < c).


Oh! Ok. Thanks. Now i am learning C++ and the question was releted to that.