Why are these types of codes not working on sublime text

@jsn853,
What is the error, when you run it in your sublime?

It shows that the program took long time to respond and tells that it cant be run on the console

Capture_2

@jsn853,
Try running this program in CMD, I want to see if it is a sublime problem or program problem.