Open Futures interview question

1.C++ Question 2. Math question 3. Brainteaser