Block interview question

Find the bug in this program and fix the error