The code can't run continual, can only print few words, why?

Thank you!