Java is the future !: posNeg

Saturday, October 9, 2010

posNeg

Given 2 int values, return true if one is negative and one is positive. Unless the parameter "negative" is true, then they both must be negative.

posNeg(1, -1, false) → true
posNeg(-1, 1, false) → true
posNeg(1, 1, false) → false

Solution :

No comments:

Post a Comment