196k views
0 votes
Given that the variables x and y have already been declared and assigned values , write an expression that evaluates to true if x is non-negative and y is negative.

User Tim Pesce
by
7.1k points

1 Answer

6 votes
( ( x > -1 ) && ( y < 0 ) ) ? 1 : 0;
User Kevin Glier
by
6.7k points