UBC interview question

What to fix for a sample program