Задача Задача №3619850
А
А
Here's how to read it, noting operator precedence (3*2>999 is evaluated first):
- Compute 3*2 > 999 → 6 > 999 → False
- Now evaluate -1 OR False
Language-dependent result:
- In Python (and JavaScript with its || operator returning the value): the left operand -1 is truthy, so the whole expression evaluates to -1.
- If you want a boolean result, use bool(-1 or (3*2 > 999)) which gives True.
- In C/C++ (with || returning 0 or 1): -1 is nonzero (true), so the expression yields 1 (true).
Summary: the logical value is true in most sense, but the exact returned value depends on the language:
- Python/JavaScript-style: -1
- C/C++-style: 1 (true)