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

+1

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

+5

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).

+1

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