Follow the algorithm.
Start with the number $40$40.
If the number is even, halve it. If the number is odd, subtract one and halve it.
Follow the algorithm.
Follow the algorithm.
Follow the algorithm.
Design algorithms involving branching and iteration to solve specific classes of mathematical problems