[Solved] What is this boolean operation? `expression * boolean` [closed]
The right way to do it is straight-forward: int hours = /*some_number*/; int wage = 100*hours; if (hours > 40) wage += 50 * (hours-40); To squeeze it to a single expression, the example takes advantage of the fact that a boolean is either 1 or 0. So x*some_bool evaluates to either x or 0. … Read more