Kotlinlearncs.online LogoJava
Return to List

Solve: Pos Neg

Imported By: Geoffrey Challen
/ Version: 2021.4.0

Given 2 int values, return true if one is negative and one is positive. Except if the parameter negative is true, then return true only if both are negative.

boolean posNeg(int a, int b, boolean negative) {
return false; // You may need to remove this starter code
}

Related Lessons

Stuck? You may find these lessons helpful: