McDonald's Interview Question

Solve this code for me