Skip to content

Latest commit

 

History

History

countOddNumbersBelowN

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Count Odd Numbers below n

8 kyu link to kata
my solution

Given a number n, return the number of positive odd numbers below n, EASY!

Examples (Input -> Output)

7  -> 3 (because odd numbers below 7 are [1, 3, 5])
15 -> 7 (because odd numbers below 15 are [1, 3, 5, 7, 9, 11, 13])

Expect large Inputs!