Analog Devices interview question

Write code from scratch with no syntax mistakes?