Starting from a positive number, count how many times you can halve it before it reaches 1. Whole-number division, so 7 goes 3, 1 — that is 2 steps.
int steps(int n)
Examples
There are also 4 hidden tests you can't see. Solve the problem, not the examples.