Danfoss interview question

The code test has two problems and need to be completed in an hour.