Skip to content

Latest commit

 

History

History

twoNumbersArePositive

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Two numbers are positive

7 kyu link to kata
my solution

Task:

Your job is to write a function, which takes three integers a, b, and c as arguments, and returns True if exactly two of of the three integers are positive numbers (greater than zero), and False - otherwise.

Examples:

twoArePositive(2, 4, -3) == true
twoArePositive(-4, 6, 8) == true
twoArePositive(4, -6, 9) == true
twoArePositive(-4, 6, 0) == false
twoArePositive(4, 6, 10) == false
twoArePositive(-14, -3, -4) == false