Doubt in my code

Here us my code :

It is not working well. What is the issue ?