Given an integer n and a position p (0-indexed from the right), return the bit value (0 or 1) at that position.
getBit(5, 0) => 1
getBit(5, 1) => 0
getBit(5, 2) => 1
Waiting for you...
CodeBot will comment on your code as you write...
Click "Run Code" or press Ctrl+Enter to test your solution