Analog Devices Interview Question

Write code from scratch with no syntax mistakes?