my program get frozen

What is the code suppose to be doing?