What is the problem in my code?

I have added comments where ever i have updated the code